Cache management in a stream computing environment that uses a set of many-core hardware processors

ABSTRACT

Disclosed aspects relate to cache management in a stream computing environment that uses a set of many-core hardware processors to process a stream of tuples by a plurality of processing elements which operate on the set of many-core hardware processors. The stream of tuples to be processed by the plurality of processing elements which operate on the set of many-core hardware processors may be received. A tuple-processing hardware-route on the set of many-core hardware processors may be determined based on a cache factor associated with the set of many-core hardware processors. The stream of tuples may be routed based on the tuple-processing hardware-route on the set of many-core hardware processors. The stream of tuples may be processed by the plurality of processing elements which operate on the set of many-core hardware processors.

BACKGROUND

This disclosure relates generally to computer systems and, moreparticularly, relates to cache management in a stream computingenvironment that uses a set of many-core hardware processors to processa stream of tuples by a plurality of processing elements which operateon the set of many-core hardware processors. Management of data may bedesired to be performed as efficiently as possible. As data needing tobe managed increases, the need for cache management in a streamcomputing environment that uses a set of many-core hardware processorsmay also increase.

SUMMARY

Aspects of the disclosure relate to cache management in a streamcomputing environment that uses a set of many-core hardware processorsto process a stream of tuples by a plurality of processing elementswhich operate on the set of many-core hardware processors. Cache memoryof a set of many-core hardware processors may be managed based on theprocessor architecture of the set of many-core hardware processors aswell as the characteristics of stream applications to be processed bythe set of many-core hardware processors to facilitate efficient taskscheduling. Based on the nature of the processor architecture and thestructure of streaming applications, a tuple-processing hardware routemay be determined to route tuples to local cache memory for processing.Sequential stream operators may be placed on local processor cores tolimit read and write operations between different processor cores.Single-job tenancy may be prioritized with respect to the set ofmany-core hardware processors to promote cache hits.

Disclosed aspects relate to cache management in a stream computingenvironment that uses a set of many-core hardware processors to processa stream of tuples by a plurality of processing elements which operateon the set of many-core hardware processors. The stream of tuples to beprocessed by the plurality of processing elements which operate on theset of many-core hardware processors may be received. A tuple-processinghardware-route on the set of many-core hardware processors may bedetermined based on a cache factor associated with the set of many-corehardware processors. The stream of tuples may be routed based on thetuple-processing hardware-route on the set of many-core hardwareprocessors. The stream of tuples may be processed by the plurality ofprocessing elements which operate on the set of many-core hardwareprocessors.

The above summary is not intended to describe each illustratedembodiment or every implementation of the present disclosure.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The drawings included in the present application are incorporated into,and form part of, the specification. They illustrate embodiments of thepresent disclosure and, along with the description, serve to explain theprinciples of the disclosure. The drawings are only illustrative ofcertain embodiments and do not limit the disclosure.

FIG. 1 illustrates an exemplary computing infrastructure to execute astream computing application according to embodiments.

FIG. 2 illustrates a view of a compute node according to embodiments.

FIG. 3 illustrates a view of a management system according toembodiments.

FIG. 4 illustrates a view of a compiler system according to embodiments.

FIG. 5 illustrates an exemplary operator graph for a stream computingapplication according to embodiments.

FIG. 6 is a flowchart illustrating a method for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments.

FIG. 7 is a flowchart illustrating a method for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments.

FIG. 8 is a flowchart illustrating a method for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments.

FIG. 9 is a flowchart illustrating a method for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments.

FIG. 10 depicts an example system for cache management in a streamcomputing environment that uses a set of many-core hardware processorsto process a stream of tuples by a plurality of processing elementswhich operate on the set of many-core hardware processors, according toembodiments.

FIG. 11 illustrates an example of cache management in a stream computingenvironment that uses a set of many-core hardware processors to processa stream of tuples by a plurality of processing elements which operateon the set of many-core hardware processors, according to embodiments.

FIG. 12 illustrates an example of cache management in a stream computingenvironment that uses a set of many-core hardware processors to processa stream of tuples by a plurality of processing elements which operateon the set of many-core hardware processors, according to embodiments.

FIG. 13 illustrates an example system for cache management in a streamcomputing environment that uses a set of many-core hardware processorsto process a stream of tuples by a plurality of processing elementswhich operate on the set of many-core hardware processors, according toembodiments.

FIG. 14 illustrates an example system architecture of a set of many-corehardware processors, according to embodiments.

While the invention is amenable to various modifications and alternativeforms, specifics thereof have been shown by way of example in thedrawings and will be described in detail. It should be understood,however, that the intention is not to limit the invention to theparticular embodiments described. On the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the invention.

DETAILED DESCRIPTION

Aspects of the disclosure relate to cache management in a streamcomputing environment that uses a set of many-core hardware processorsto process a stream of tuples by a plurality of processing elementswhich operate on the set of many-core hardware processors. Cache memoryof a set of many-core hardware processors may be managed based on theprocessor architecture of the set of many-core hardware processors aswell as the characteristics of stream applications to be processed bythe set of many-core hardware processors to facilitate efficient taskscheduling. Based on the nature of the processor architecture and thestructure of streaming applications, a tuple-processing hardware routemay be determined to route tuples to local cache memory (e.g., L1, L2,L3) for processing. Sequential stream operators may be placed on localprocessor cores to limit read and write operations between differentprocessor cores (e.g., saving processor cycles). Single-job tenancy maybe prioritized with respect to the set of many-core hardware processorsto promote cache hits. Leveraging processor architecture information andstream application characteristics with respect to cache management maybe associated with benefits such as stream application performance,cache hit rates, and processing efficiency.

Many-core hardware processors may be used to perform processingoperations on streams of tuples in a stream computing environment.Aspects of the disclosure relate to the recognition that, in somesituations, operating system schedulers may not take into account thenature of the streaming application or the processor architecture whenscheduling tasks, resulting in challenges associated with cache hitrates (e.g., multiple jobs scheduled on one core may lead to cachemisses) and local cache usage (e.g., jobs may be scheduled using slowercaches, or spread out over multiple cores). Accordingly, aspects of thedisclosure relate to determining a tuple-processing hardware route basedon the nature of the processor architecture and the structure of thestreaming application to facilitate efficient cache usage of a set ofmany-core hardware processors with respect to a stream computingenvironment. As such, cache hit rates, cache controller congestion, andjob processing time may be benefited.

Stream-based computing and stream-based database computing are emergingas a developing technology for database systems. Products are availablewhich allow users to create applications that process and querystreaming data before it reaches a database file. With this emergingtechnology, users can specify processing logic to apply to inbound datarecords while they are “in flight,” with the results available in a veryshort amount of time, often in fractions of a second. Constructing anapplication using this type of processing has opened up a newprogramming paradigm that will allow for development of a broad varietyof innovative applications, systems, and processes, as well as presentnew challenges for application programmers and database developers.

In a stream computing application, stream operators are connected to oneanother such that data flows from one stream operator to the next (e.g.,over a TCP/IP socket). When a stream operator receives data, it mayperform operations, such as analysis logic, which may change the tupleby adding or subtracting attributes, or updating the values of existingattributes within the tuple. When the analysis logic is complete, a newtuple is then sent to the next stream operator. Scalability is achievedby distributing an application across nodes by creating executables(i.e., processing elements), as well as replicating processing elementson multiple nodes and load balancing among them. Stream operators in astream computing application can be fused together to form a processingelement that is executable. Doing so allows processing elements to sharea common process space, resulting in much faster communication betweenstream operators than is available using inter-process communicationtechniques (e.g., using a TCP/IP socket). Further, processing elementscan be inserted or removed dynamically from an operator graphrepresenting the flow of data through the stream computing application.A particular stream operator may not reside within the same operatingsystem process as other stream operators. In addition, stream operatorsin the same operator graph may be hosted on different nodes, e.g., ondifferent compute nodes or on different cores of a compute node.

Data flows from one stream operator to another in the form of a “tuple.”A tuple is a sequence of one or more attributes associated with anentity. Attributes may be any of a variety of different types, e.g.,integer, float, Boolean, string, etc. The attributes may be ordered. Inaddition to attributes associated with an entity, a tuple may includemetadata, i.e., data about the tuple. A tuple may be extended by addingone or more additional attributes or metadata to it. As used herein,“stream” or “data stream” refers to a sequence of tuples. Generally, astream may be considered a pseudo-infinite sequence of tuples.

Tuples are received and output by stream operators and processingelements. An input tuple corresponding with a particular entity that isreceived by a stream operator or processing element, however, isgenerally not considered to be the same tuple that is output by thestream operator or processing element, even if the output tuplecorresponds with the same entity or data as the input tuple. An outputtuple need not be changed in some way from the input tuple.

Nonetheless, an output tuple may be changed in some way by a streamoperator or processing element. An attribute or metadata may be added,deleted, or modified. For example, a tuple will often have two or moreattributes. A stream operator or processing element may receive thetuple having multiple attributes and output a tuple corresponding withthe input tuple. The stream operator or processing element may onlychange one of the attributes so that all of the attributes of the outputtuple except one are the same as the attributes of the input tuple.

Generally, a particular tuple output by a stream operator or processingelement may not be considered to be the same tuple as a correspondinginput tuple even if the input tuple is not changed by the processingelement. However, to simplify the present description and the claims, anoutput tuple that has the same data attributes or is associated with thesame entity as a corresponding input tuple will be referred to herein asthe same tuple unless the context or an express statement indicatesotherwise.

Stream computing applications handle massive volumes of data that needto be processed efficiently and in real time. For example, a streamcomputing application may continuously ingest and analyze hundreds ofthousands of messages per second and up to petabytes of data per day.Accordingly, each stream operator in a stream computing application maybe required to process a received tuple within fractions of a second.Unless the stream operators are located in the same processing element,it is necessary to use an inter-process communication path each time atuple is sent from one stream operator to another. Inter-processcommunication paths can be a critical resource in a stream computingapplication. According to various embodiments, the available bandwidthon one or more inter-process communication paths may be conserved.Efficient use of inter-process communication bandwidth can speed upprocessing.

A streams processing job has a directed graph of processing elementsthat send data tuples between the processing elements. The processingelement operates on the incoming tuples, and produces output tuples. Aprocessing element has an independent processing unit and runs on ahost. The streams platform can be made up of a collection of hosts thatare eligible for processing elements to be placed upon. When a job issubmitted to the streams run-time, the platform scheduler processes theplacement constraints on the processing elements, and then determines(the best) one of these candidates host for (all) the processingelements in that job, and schedules them for execution on the decidedhost.

Aspects of the disclosure relate to a system, method, and computerprogram product for cache management in a stream computing environmentthat uses a set of many-core hardware processors to process a stream oftuples by a plurality of processing elements which operate on the set ofmany-core hardware processors. The stream of tuples to be processed bythe plurality of processing elements which operate on the set ofmany-core hardware processors may be received. A tuple-processinghardware-route on the set of many-core hardware processors may bedetermined based on a cache factor associated with the set of many-corehardware processors. The stream of tuples may be routed based on thetuple-processing hardware-route on the set of many-core hardwareprocessors. The stream of tuples may be processed by the plurality ofprocessing elements which operate on the set of many-core hardwareprocessors.

In embodiments, a first cache utilization factor may be computed for afirst cache of a first core of the set of many-core hardware processors,a second cache utilization factor may be computed for a second cache ofthe first core of the set of many core-hardware processors, atuple-processing hardware-route to prioritize utilization of the firstcache of the first core of the set of many core hardware processors maybe resolved, and the first cache of the first core of the set ofmany-core hardware processors may be prioritized with respect to thesecond cache of the first core of the set of many-core hardwareprocessors. In embodiments, it may be detected that the first and secondcaches of the first core of the set of many-core hardware processors arelocal caches to the first core of the set of many core processors. Inembodiments, it may be detected that the first and second caches of thefirst core of the set of many-core hardware processors are local cachesonly to the first core of the set of many-core hardware processors. Inembodiments, it may be ascertained that a second cache size of thesecond cache of the first core of the set of many-core hardwareprocessors exceeds a first cache size of the first cache of the firstcore of the set of many-core hardware processors, and that a secondcache access burden of the second cache of the first core of the set ofmany-core hardware processors exceeds a first cache access burden of thefirst cache of the first core of the set of many-core hardwareprocessors. Altogether, aspects of the disclosure can have performanceor efficiency benefits. Aspects may save resources such as bandwidth,disk, processing, or memory.

FIG. 1 illustrates one exemplary computing infrastructure 100 that maybe configured to execute a stream computing application, according tosome embodiments. The computing infrastructure 100 includes a managementsystem 105 and two or more compute nodes 110A-110D—i.e., hosts—which arecommunicatively coupled to each other using one or more communicationsnetworks 120. The communications network 120 may include one or moreservers, networks, or databases, and may use a particular communicationprotocol to transfer data between the compute nodes 110A-110D. Acompiler system 102 may be communicatively coupled with the managementsystem 105 and the compute nodes 110 either directly or via thecommunications network 120.

The communications network 120 may include a variety of types ofphysical communication channels or “links.” The links may be wired,wireless, optical, or any other suitable media. In addition, thecommunications network 120 may include a variety of network hardware andsoftware for performing routing, switching, and other functions, such asrouters, switches, or bridges. The communications network 120 may bededicated for use by a stream computing application or shared with otherapplications and users. The communications network 120 may be any size.For example, the communications network 120 may include a single localarea network or a wide area network spanning a large geographical area,such as the Internet. The links may provide different levels ofbandwidth or capacity to transfer data at a particular rate. Thebandwidth that a particular link provides may vary depending on avariety of factors, including the type of communication media andwhether particular network hardware or software is functioning correctlyor at full capacity. In addition, the bandwidth that a particular linkprovides to a stream computing application may vary if the link isshared with other applications and users. The available bandwidth mayvary depending on the load placed on the link by the other applicationsand users. The bandwidth that a particular link provides may also varydepending on a temporal factor, such as time of day, day of week, day ofmonth, or season.

FIG. 2 is a more detailed view of a compute node 110, which may be thesame as one of the compute nodes 110A-110D of FIG. 1, according tovarious embodiments. The compute node 110 may include, withoutlimitation, one or more processors (CPUs) 205, a network interface 215,an interconnect 220, a memory 225, and a storage 230. The compute node110 may also include an I/O device interface 210 used to connect I/Odevices 212, e.g., keyboard, display, and mouse devices, to the computenode 110.

Each CPU 205 retrieves and executes programming instructions stored inthe memory 225 or storage 230. Similarly, the CPU 205 stores andretrieves application data residing in the memory 225. The interconnect220 is used to transmit programming instructions and application databetween each CPU 205, I/O device interface 210, storage 230, networkinterface 215, and memory 225. The interconnect 220 may be one or morebusses. The CPUs 205 may be a single CPU, multiple CPUs, or a single CPUhaving multiple processing cores in various embodiments. In oneembodiment, a processor 205 may be a digital signal processor (DSP). Oneor more processing elements 235 (described below) may be stored in thememory 225. A processing element 235 may include one or more streamoperators 240 (described below). In one embodiment, a processing element235 is assigned to be executed by only one CPU 205, although in otherembodiments the stream operators 240 of a processing element 235 mayinclude one or more threads that are executed on two or more CPUs 205.The memory 225 is generally included to be representative of a randomaccess memory, e.g., Static Random Access Memory (SRAM), Dynamic RandomAccess Memory (DRAM), or Flash. The storage 230 is generally included tobe representative of a non-volatile memory, such as a hard disk drive,solid state device (SSD), or removable memory cards, optical storage,flash memory devices, network attached storage (NAS), or connections tostorage area network (SAN) devices, or other devices that may storenon-volatile data. The network interface 215 is configured to transmitdata via the communications network 120.

A stream computing application may include one or more stream operators240 that may be compiled into a “processing element” container 235. Thememory 225 may include two or more processing elements 235, eachprocessing element having one or more stream operators 240. Each streamoperator 240 may include a portion of code that processes tuples flowinginto a processing element and outputs tuples to other stream operators240 in the same processing element, in other processing elements, or inboth the same and other processing elements in a stream computingapplication. Processing elements 235 may pass tuples to other processingelements that are on the same compute node 110 or on other compute nodesthat are accessible via communications network 120. For example, aprocessing element 235 on compute node 110A may output tuples to aprocessing element 235 on compute node 110B.

The storage 230 may include a buffer 260. Although shown as being instorage, the buffer 260 may be located in the memory 225 of the computenode 110 or in a combination of both memories. Moreover, storage 230 mayinclude storage space that is external to the compute node 110, such asin a cloud.

The compute node 110 may include one or more operating systems 262. Anoperating system 262 may be stored partially in memory 225 and partiallyin storage 230. Alternatively, an operating system may be storedentirely in memory 225 or entirely in storage 230. The operating systemprovides an interface between various hardware resources, including theCPU 205, and processing elements and other components of the streamcomputing application. In addition, an operating system provides commonservices for application programs, such as providing a time function.

FIG. 3 is a more detailed view of the management system 105 of FIG. 1according to some embodiments. The management system 105 may include,without limitation, one or more processors (CPUs) 305, a networkinterface 315, an interconnect 320, a memory 325, and a storage 330. Themanagement system 105 may also include an I/O device interface 310connecting I/O devices 312, e.g., keyboard, display, and mouse devices,to the management system 105.

Each CPU 305 retrieves and executes programming instructions stored inthe memory 325 or storage 330. Similarly, each CPU 305 stores andretrieves application data residing in the memory 325 or storage 330.The interconnect 320 is used to move data, such as programminginstructions and application data, between the CPU 305, I/O deviceinterface 310, storage unit 330, network interface 315, and memory 325.The interconnect 320 may be one or more busses. The CPUs 305 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 305 may bea DSP. Memory 325 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 330 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, Flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or the cloud. Thenetwork interface 315 is configured to transmit data via thecommunications network 120.

The memory 325 may store a stream manager 134. Additionally, the storage330 may store an operator graph 335. The operator graph 335 may definehow tuples are routed to processing elements 235 (FIG. 2) for processingor stored in memory 325 (e.g., completely in embodiments, partially inembodiments).

The management system 105 may include one or more operating systems 332.An operating system 332 may be stored partially in memory 325 andpartially in storage 330. Alternatively, an operating system may bestored entirely in memory 325 or entirely in storage 330. The operatingsystem provides an interface between various hardware resources,including the CPU 305, and processing elements and other components ofthe stream computing application. In addition, an operating systemprovides common services for application programs, such as providing atime function.

FIG. 4 is a more detailed view of the compiler system 102 of FIG. 1according to some embodiments. The compiler system 102 may include,without limitation, one or more processors (CPUs) 405, a networkinterface 415, an interconnect 420, a memory 425, and storage 430. Thecompiler system 102 may also include an I/O device interface 410connecting I/O devices 412, e.g., keyboard, display, and mouse devices,to the compiler system 102.

Each CPU 405 retrieves and executes programming instructions stored inthe memory 425 or storage 430. Similarly, each CPU 405 stores andretrieves application data residing in the memory 425 or storage 430.The interconnect 420 is used to move data, such as programminginstructions and application data, between the CPU 405, I/O deviceinterface 410, storage unit 430, network interface 415, and memory 425.The interconnect 420 may be one or more busses. The CPUs 405 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 405 may bea DSP. Memory 425 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 430 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or to the cloud. Thenetwork interface 415 is configured to transmit data via thecommunications network 120.

The compiler system 102 may include one or more operating systems 432.An operating system 432 may be stored partially in memory 425 andpartially in storage 430. Alternatively, an operating system may bestored entirely in memory 425 or entirely in storage 430. The operatingsystem provides an interface between various hardware resources,including the CPU 405, and processing elements and other components ofthe stream computing application. In addition, an operating systemprovides common services for application programs, such as providing atime function.

The memory 425 may store a compiler 136. The compiler 136 compilesmodules, which include source code or statements, into the object code,which includes machine instructions that execute on a processor. In oneembodiment, the compiler 136 may translate the modules into anintermediate form before translating the intermediate form into objectcode. The compiler 136 may output a set of deployable artifacts that mayinclude a set of processing elements and an application descriptionlanguage file (ADL file), which is a configuration file that describesthe stream computing application. In embodiments, a streams applicationbundle or streams application bundle file may be created. In someembodiments, the compiler 136 may be a just-in-time compiler thatexecutes as part of an interpreter. In other embodiments, the compiler136 may be an optimizing compiler. In various embodiments, the compiler136 may perform peephole optimizations, local optimizations, loopoptimizations, inter-procedural or whole-program optimizations, machinecode optimizations, or any other optimizations that reduce the amount oftime required to execute the object code, to reduce the amount of memoryrequired to execute the object code, or both. The output of the compiler136 may be represented by an operator graph, e.g., the operator graph335.

The compiler 136 may also provide the application administrator with theability to optimize performance through profile-driven fusionoptimization. Fusing operators may improve performance by reducing thenumber of calls to a transport. While fusing stream operators mayprovide faster communication between operators than is available usinginter-process communication techniques, any decision to fuse operatorsrequires balancing the benefits of distributing processing acrossmultiple compute processes with the benefit of faster inter-operatorcommunications. The compiler 136 may automate the fusion process todetermine how to best fuse the operators to be hosted by one or moreprocessing elements, while respecting user-specified constraints. Thismay be a two-step process, including compiling the application in aprofiling mode and running the application, then re-compiling and usingthe optimizer during this subsequent compilation. The end result may,however, be a compiler-supplied deployable application with an optimizedapplication configuration.

FIG. 5 illustrates an exemplary operator graph 500 for a streamcomputing application beginning from one or more sources 135 through toone or more sinks 504, 506, according to some embodiments. This flowfrom source to sink may also be generally referred to herein as anexecution path. In addition, a flow from one processing element toanother may be referred to as an execution path in various contexts.Although FIG. 5 is abstracted to show connected processing elementsPE1-PE10, the operator graph 500 may include data flows between streamoperators 240 (FIG. 2) within the same or different processing elements.Typically, processing elements, such as processing element 235 (FIG. 2),receive tuples from the stream as well as output tuples into the stream(except for a sink—where the stream terminates, or a source—where thestream begins). While the operator graph 500 includes a relatively smallnumber of components, an operator graph may be much more complex and mayinclude many individual operator graphs that may be statically ordynamically linked together.

The example operator graph shown in FIG. 5 includes ten processingelements (labeled as PE1-PE10) running on the compute nodes 110A-110D. Aprocessing element may include one or more stream operators fusedtogether to form an independently running process with its own processID (PID) and memory space. In cases where two (or more) processingelements are running independently, inter-process communication mayoccur using a “transport,” e.g., a network socket, a TCP/IP socket, orshared memory. Inter-process communication paths used for inter-processcommunications can be a critical resource in a stream computingapplication. However, when stream operators are fused together, thefused stream operators can use more rapid communication techniques forpassing tuples among stream operators in each processing element.

The operator graph 500 begins at a source 135 and ends at a sink 504,506. Compute node 110A includes the processing elements PE1, PE2, andPE3. Source 135 flows into the processing element PE1, which in turnoutputs tuples that are received by PE2 and PE3. For example, PE1 maysplit data attributes received in a tuple and pass some data attributesin a new tuple to PE2, while passing other data attributes in anothernew tuple to PE3. As a second example, PE1 may pass some received tuplesto PE2 while passing other tuples to PE3. Tuples that flow to PE2 areprocessed by the stream operators contained in PE2, and the resultingtuples are then output to PE4 on compute node 110B. Likewise, the tuplesoutput by PE4 flow to operator sink PE6 504. Similarly, tuples flowingfrom PE3 to PE5 also reach the operators in sink PE6 504. Thus, inaddition to being a sink for this example operator graph, PE6 could beconfigured to perform a join operation, combining tuples received fromPE4 and PE5. This example operator graph also shows tuples flowing fromPE3 to PE7 on compute node 110C, which itself shows tuples flowing toPE8 and looping back to PE7. Tuples output from PE8 flow to PE9 oncompute node 110D, which in turn outputs tuples to be processed byoperators in a sink processing element, for example PE10 506.

Processing elements 235 (FIG. 2) may be configured to receive or outputtuples in various formats, e.g., the processing elements or streamoperators could exchange data marked up as XML, documents. Furthermore,each stream operator 240 within a processing element 235 may beconfigured to carry out any form of data processing functions onreceived tuples, including, for example, writing to database tables orperforming other database operations such as data joins, splits, reads,etc., as well as performing other data analytic functions or operations.

The stream manager 134 of FIG. 1 may be configured to monitor a streamcomputing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph,e.g., operator graph 132. The stream manager 134 may move processingelements from one compute node 110 to another, for example, to managethe processing loads of the compute nodes 110A-110D in the computinginfrastructure 100. Further, stream manager 134 may control the streamcomputing application by inserting, removing, fusing, un-fusing, orotherwise modifying the processing elements and stream operators (orwhat tuples flow to the processing elements) running on the computenodes 110A-110D.

Because a processing element may be a collection of fused streamoperators, it is equally correct to describe the operator graph as oneor more execution paths between specific stream operators, which mayinclude execution paths to different stream operators within the sameprocessing element. FIG. 5 illustrates execution paths betweenprocessing elements for the sake of clarity.

FIG. 6 is a flowchart illustrating a method 600 for cache management ina stream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of method 600 relate to determining atuple-processing hardware route based on a cache factor associated withthe set of many-core hardware processors, and routing a stream of tuplesbased on the tuple-processing hardware route for utilizing the set ofmany-core hardware processors. The stream computing environment mayinclude a platform for dynamically delivering and analyzing data inreal-time. The stream computing environment may include an operatorgraph having a plurality of stream operators (e.g., filter operations,sort operators, join operators) and processing elements configured toperform processing operations on tuples flowing through the operatorgraph. In embodiments, a set of many-core hardware processors may beused to perform the processing operations on the tuples in the operatorgraph. The set of many-core hardware processors may include one or morephysical processor units having a plurality (e.g., 10s, 100s, 1000s) ofindependent processor cores configured for parallel processing. Inembodiments, one or more stream operators may be placed on one or morecores of one or more processors of the set of many-core hardwareprocessors for execution of processing operations on streams of tuples.The method 600 may begin at block 601.

In embodiments, the receiving, the determining, the routing, theprocessing, and the other steps described herein may each be executed ina dynamic fashion at block 604. The steps described herein may beexecuted in a dynamic fashion to streamline cache management in thestream computing environment that uses the set of many-core hardwareprocessors to process the stream of tuples by the plurality ofprocessing elements which operate on the set of many-core hardwareprocessors. For instance, the receiving, the determining, the routing,the processing, and the other steps described herein may occur inreal-time, ongoing, or on-the-fly. As an example, one or more stepsdescribed herein may be performed on-the-fly (e.g., tuple-processinghardware routes may be determined dynamically based on processorarchitecture characteristics and the structure of stream applications sotuples may be routed for processing by the set of many-core hardwareprocessors in real-time) in order to streamline (e.g., facilitate,promote, enhance) cache management in the stream computing environment.Other methods of performing the steps described herein are alsopossible.

In embodiments, the receiving, the determining, the routing, theprocessing, and the other steps described herein may each be executed inan automated fashion at block 606. The steps described herein may beexecuted in an automated fashion without user intervention. Inembodiments, the receiving, the determining, the routing, theprocessing, and the other steps described herein may be carried out byan internal cache management module maintained in a persistent storagedevice of a locale computing device (e.g., network node). Inembodiments, the receiving, the determining, the routing, theprocessing, and the other steps described herein may be carried out byan external cache management module hosted by a remote computing deviceor server (e.g., server accessible via a subscription, usage-based, orother service model). In this way, aspects of cache management in thestream computing environment may be performed using automated computingmachinery without manual action. Other methods of performing the stepsdescribed herein are also possible.

At block 620, the stream of tuples may be received. The stream of tuplesmay be received to be processed by the plurality of processing elementswhich operate on the set of many-core hardware processors. Generally,receiving can include sensing, detecting, recognizing, identifying,collecting, or otherwise accepting delivery of the stream of tuples. Thestream of tuples may include a collection of data units that define asequence of attributes (e.g., named values). For instance, a tuple of[sym=“Fe”, no=26] may consist of two attributes “sym=“Fe”” and “no=26.”Batches of tuples may flow through an operator graph and undergoprocessing operations by one or more stream operators (e.g., processingelements to modify input tuples and produce output tuples). The set ofstream operators may be placed (e.g., deployed) on one or more cores(e.g., independent processing unit for reading and executing programinstructions) of one or more processors of the set of many-core hardwareprocessors. An operating system schedule configured to manage one ormore cores of the set of many-core hardware processors may schedule oneor more processing operations for execution with respect to the streamof tuples by the set of stream operators. In embodiments, receiving mayinclude detecting an incoming set of input tuples with respect to aparticular core or cores of the set of many-core hardware processors.For instance, receiving may include loading the stream of tuples into atuple buffer (e.g., first-in-first-out queue) of a particular streamoperator for subsequent routing and processing. Other methods ofreceiving the stream of tuples to be processed by the plurality ofprocessing elements on the set of many-core hardware processors are alsopossible.

At block 640, a tuple-processing hardware-route on the set of many-corehardware processors may be determined. The determining may be performedbased on a cache factor associated with the set of many-core hardwareprocessors. Generally, determining can include formulating, resolving,computing, calculating, identifying, or otherwise ascertaining thetuple-processing hardware route based on the cache factor associatedwith the set of many-core hardware processors. The tuple-processinghardware-route may include a route, course, branch, or path taken by thestream of tuples as they are processed by the processing elements of theset of many-core hardware processors. In embodiments, thetuple-processing hardware route may indicate the execution path taken bythe stream of tuples as they flow through the operator graph of thestream computing environment (e.g., which branches of the operator graphthe tuples travel, which stream operators they are processed by). Inembodiments, the tuple-processing hardware route may indicate thehardware components configured to process the stream of tuples. Forinstance, the tuple-processing hardware route may indicate the hardwareprocessors, processor cores, and individual cache units used to processthe stream of tuples. As an example, the tuple-processing hardware routemay indicate that a stream of tuples is to be processed by a “join”operator using an L1 cache of a third processor core on a first hardwareprocessor followed by a “filter” operator using an L2 cache of a secondprocessor core on a second hardware processor. In embodiments, thetuple-processing hardware-route may be determined based on a cachefactor associated with the set of many-core hardware processors. Thecache factor may include an attribute, condition, property, criterion,or other parameter that characterizes one or more caches of one or morecores of at least one hardware processor of the set of many-corehardware processors. The cache factor may characterize the nature of aportion of cache memory with respect to the processor architecture ofthe set of many-core hardware processors, or the suitability of aparticular cache for processing/storage of a set of tuples of the streamof tuples. As examples, the cache factor may include the speed of acache (e.g., 3 processor cycles, 12 processor cycles), the size of acache (e.g., 64 kilobytes, 2 megabytes), the utilization of a cache(e.g., number of jobs that use the cache), the location of a cache(e.g., which core of which processor), physical distance from anothercore (e.g., 5 millimeters), a cache access burden (e.g., operationalcost of using the cache) or the like. In embodiments, determining thetuple-processing hardware route may include evaluating the set ofmany-core hardware processors with respect to the stream of tuples toascertain a sequence of cache units (e.g., of one or more cores) thatdefine a path for processing the stream of tuples that achieves asuitability threshold (e.g., total processing time below a threshold,efficiency above a certain level). As an example, determining mayinclude examining the cache factor (e.g., location, speed, size,availability) for cache units of a first processor and a secondprocessor, and calculating that a candidate tuple-processing hardwareroute of an L2 cache of a first processor core of the first processor,an L1 cache of a fifth processor core of the second processor, and an L1cache of an eleventh processor core of the second processor achieves atotal number of processor cycles of 31 cycles, achieving a targetprocessor cycle threshold of less than 45 cycles. Accordingly, thecandidate tuple-processing hardware route may be determined as thetuple-processing hardware route to process the stream of tuples. Othermethods of determining the tuple-processing hardware-route based on thecache factor associated with the set of many-core hardware processorsare also possible.

At block 660, the stream of tuples may be routed. The routing may beperformed based on the tuple-processing hardware-route on the set ofmany-core hardware processors. Generally, routing can include conveying,relaying, transferring, conducting, sending, or otherwise directing thestream of tuples based on the tuple-processing hardware-route on the setof many-core hardware processors. In embodiments, routing the stream oftuples may include directing the stream of tuples to the cache units ofthe processor cores indicated by the tuple-processing hardware route.For instance, in embodiments, routing may include identifying a networkpath address for each hardware component (e.g., cache) designated by thetuple-processing hardware-route, ascertaining one or more communicationbuses that may be used to transfer the stream of tuples between eachrespective component of the tuple-processing hardware-route, andsubsequently transmitting the stream of tuples to each hardwarecomponent of the tuple-processing hardware-route using the identifiedcommunication buses and network path addresses. As described herein, thestream of tuples may undergo one or more processing operations by theprocessing elements deployed to each core specified by thetuple-processing hardware-route. As an example, consider that atuple-processing hardware-route for a set of tuples is determined thatdesignates that the set of tuples be processed at an L1 cache of afourth core of a first processor, an L2 cache of the fourth core of thefirst processor, an L2 cache of a fifth core of the first processor, andan L1 cache of a second core of a second processor. Accordingly, thestream of tuples may be transferred from the L1 cache of the fourth coreof the first processor to the L2 cache of the fourth core of the firstprocessor, the L2 cache of the fifth core of the first processor, andthe L1 cache of the second core of the second processor usingcorresponding network path addresses and communication buses for eachcache unit of the tuple-processing hardware-route. Other methods ofrouting the stream of tuples based on the tuple-processinghardware-route are also possible.

At block 680, the stream of tuples may be processed. The stream oftuples may be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors. The processing maybe performed utilizing the set of many-core hardware processors.Generally, processing can include analyzing, evaluating, altering,investigating, examining, modifying, or otherwise managing the stream oftuples. Processing the stream of tuples may include using one or moreprocessor elements placed on the set of many-core hardware processors toperform a series of processing operations on the stream of tuples toconvert input tuples to output tuples. In embodiments, each core of theset of many-core hardware processors that is defined as part of thetuple-processing hardware-route may be configured to perform one or moreprocessing operations on the stream of tuples. For instance, inembodiments, in response to detecting that the stream of tuples has beenwritten to a cache unit (e.g., L1 cache) of a particular core, the coremay read the stream of tuples from the cache unit, execute one or morescheduled processing operations (e.g., joining, sorting, filtering), andrewrite the modified stream of tuples to the cache unit to awaitoperation of a subsequent processing operation by the same core ortransfer to another core defined by the tuple-processing hardware-route.As an example, consider that a tuple-processing hardware-route definesthat a stream of tuples be processed by a filter operation at an L2cache of a third core of a first processor. Accordingly, the stream oftuples may be written to the L2 cache of the third core of the firstprocessor, be read from the L2 cache, processed by the filter operationof the third core to remove tuples associated with a timestamp before athreshold point in time, and written back to the L2 cache. Other methodsof processing the stream of tuples by the plurality of processingelements which operate on the set of many-core hardware processors arealso possible.

Consider the following example. A stream of tuples related to radiosignals may be received (e.g., stored in a buffer or queue to awaitprocessing) by a set of many-core hardware processors including a firstprocessor and a second processor that each have four independent cores.A filter operator may be placed on the first processor and a sortoperator may be placed on the second processor. The stream of tuples maybe formatted in individual tuple batches each having a file size of 1megabyte. As described herein, a tuple-processing hardware route may bedetermined based on a cache factor associated with the set of many-corehardware processors. The cache factor may indicate that the size of theL1 cache for each core of both the first and second processors is 64kilobytes, and that the L2 cache for each core of both the first andsecond processors is 2 megabytes. In embodiments, the cache factor mayalso indicate that the first, third, and fourth cores of the firstprocessor are operating at 80% capacity under current workloads, andthat the second and third cores of the second processor are operating at91% under current workloads (e.g., such that placement of the stream oftuples on those cores may result in latency or high cache-miss rates).Accordingly, a tuple-processing hardware-route may be determined for thestream of tuples based on the cache factor. As an example, atuple-processing hardware-route of the L2 cache on a second core of thefirst processor (e.g., the 1 megabyte tuple batches may be too big forL1 caches prior to filtering), the L1 cache of the first core of thesecond processor (e.g., the tuple batches may be an appropriate size forthe L1 cache after filtering), and the L2 cache of the first core of thesecond processor may be determined (e.g., the L2 cache may be used as aback-up in case the tuple batches are too large for the L1 cache). Assuch, the stream of tuples may be routed from the L2 cache of the secondcore of the first processor to the L1 cache of the first core of thesecond processor and the L2 cache of the first core of the secondprocessor as defined by the tuple-processing hardware-route. Inembodiments, the stream of tuples may be processed by the processingelements/stream operators placed on each core of the processors includedin the tuple-processing hardware-route. For instance, tuple batches ofthe stream of tuples may be written to the L2 cache of the second coreof the first processor, read from the L2 cache, filtered by the filteroperator (e.g., to remove radio wave data outside a thresholdfrequency), written back to the L2 cache of the second core, routed andwritten to either the L1 cache or the L2 cache of the first core of thesecond processor (e.g., based on the size of the filtered tuples), readfrom the L1 or L2 cache, sorted by the sort operator (e.g., sorted byspectral power distribution range) and written back to the correspondingcache of the second processor. Other methods of cache management in astream computing environment using a set of many-core hardwareprocessors are also possible.

Method 600 concludes at block 699. Aspects of method 600 may provideperformance or efficiency benefits related to cache management. Forinstance, determining a tuple-processing hardware route based on a cachefactor associated with the set of many-core hardware processors androuting a stream of tuples based on the tuple-processing hardware routemay promote cache hits and facilitate low-latency processing of tuples.Altogether, leveraging processor architecture information and streamapplication characteristics with respect to cache management may beassociated with benefits such as stream application performance, cachehit rates, and processing efficiency. Aspects may save resources such asbandwidth, disk, processing, or memory.

FIG. 7 is a flowchart illustrating a method 700 for cache management ina stream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of method 700 method 700 relate toresolving the tuple-processing hardware route to prioritize utilizationof a first cache of a first core of the set of many core hardwareprocessors based on computation of utilization factors for the firstcache of the first core and the second cache of the first core. Aspectsof method 700 may be similar or the same as aspects of method 600, andaspects may be utilized interchangeably. The method 700 may begin atblock 701.

In embodiments, it may be detected that the first and second caches ofthe first core of the set of many-core hardware processors are localcaches to the first core of the set of many-core hardware processors atblock 711. The detecting may be performed for cache management in thestream computing environment. Generally, detecting can include sensing,discovering, recognizing, resolving, identifying, or otherwiseascertaining that the first and second caches of the first core of theset of many-core hardware processors are local caches to the first coreof the set of many-core hardware processors. In embodiments, detectingmay include examining the physical processor architecture of the set ofmany-core hardware processors, and identifying that the first and secondcaches are located on the same physical processor (e.g., same integratedcircuit) as the first core. As an example, detecting may includedetermining that an L1 cache (e.g., first cache) and an L2 cache (e.g.,second cache) located on the same physical processor are coupled withthe first core. In certain embodiments, detecting may includeidentifying that an L3 cache is communicatively connected to the firstcore using a local system bus (e.g., and thus may be considered local tothe first core). In embodiments, it may be detected (e.g., sensed,discovered, recognized, resolved, identified, ascertained) that thefirst and second caches of the first core of the set of many-corehardware processors are local caches only to the first core of the setof many-core hardware processors at block 712. In embodiments, detectingmay include examining the physical processor architecture of the set ofmany-core hardware processors, and identifying that the first and secondcaches are not communicatively connected to any other cores on the samephysical processor, such that the first and second caches are onlylocally accessible to the first core. As an example, detecting mayinclude determining that an L1 cache (e.g., first cache) and an L2 cache(e.g., second cache) do not maintain any local system bus connections toother cores on the same processor. Other methods of detecting that thefirst and second caches of the first core are local caches to the firstcore, and detecting that the first and second caches of the first coreare local caches only to the first core are also possible.

In embodiments, it may be ascertained that a second cache size of thesecond cache of the first core of the set of many-core hardwareprocessors exceeds a first cache size of the first cache of the firstcore of the set of many-core hardware processors at block 714. Theascertaining may be performed for cache management in the streamcomputing environment. Generally, ascertaining can include formulating,resolving, computing, calculating, identifying, or otherwise determiningthat the second cache size of the second cache of the first core exceedsthe first cache size of the first cache of the first core. The first andsecond cache sizes may indicate the amount of data storage spaceavailable to the first and second caches, respectively. In embodiments,ascertaining may include using a system hardware diagnostic to examinethe first cache size with respect to the second cache size, anddetermining that the magnitude of the data storage space allocated foruse by the second cache is greater than the magnitude of the datastorage space allocated for use by the first cache. As an example, an L1cache (e.g., first cache) of the first core may be compared with an L2cache (e.g., second cache) of the first core, and it may be ascertainedthat the L2 cache has a size of “2 megabytes,” which exceeds the L1cache size of “64 kilobytes.” As another example, an L2 cache (e.g.,first cache) of the first core may be compared with an L3 cache (e.g.,second cache), and it may be ascertained that the L3 cache has a size of“16 megabytes,” which exceeds the L2 cache size of “2 megabytes.” Othermethods of ascertaining that the second cache size of the second cacheof the first core exceeds the first cache size of the first cache of thefirst core are also possible.

At block 720, the stream of tuples may be received. The stream of tuplesmay be received to be processed by the plurality of processing elementswhich operate on the set of many-core hardware processors. Generally,receiving can include sensing, detecting, recognizing, identifying,collecting, or otherwise accepting delivery of the stream of tuples. Inembodiments, receiving may include detecting an incoming set of inputtuples with respect to a particular core or cores of the set ofmany-core hardware processors. Other methods of receiving the stream oftuples to be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors are also possible.

At block 731, a first cache utilization factor may be computed. Thefirst cache utilization factor may be computed for a first cache of afirst core of the set of many-core hardware processors. The computingmay be performed for cache management in the stream computingenvironment. Generally, computing can include formulating, calculating,ascertaining, measuring, estimating, or otherwise determining the firstcache utilization factor for the first cache of the first core of theset of many-core hardware processors. The first cache utilization factormay include an attribute, condition, property, criterion, or otherparameter that characterizes the current or expected usage, performance,or availability of the first cache of the first core of the set ofmany-core hardware processors. For instance, the first cache utilizationfactor may indicate the accessibility (e.g., access burden) of the firstcache with respect to the stream of tuples. In embodiments, the firstcache utilization factor may be quantitatively expressed as an integerbetween 0 and 100, where greater values indicate greater suitability(e.g., easier access, faster expected processing) for processing thestream of tuples. In embodiments, computing the first cache utilizationfactor may include calculating an expected number of CPU cycles thatwould be necessary to process the stream of tuples using the first cacheof the first core, and determining the first cache utilization factorfor the first cache of the first core based on the expected number ofCPU cycles (e.g., where higher expected numbers of CPU cycles correlatewith lower cache utilization factors). As an example, consider that thefirst cache is an L1 cache. Accordingly, computing may includeevaluating the L1 cache and ascertaining that processing data using theL1 cache may require an expected number of CPU cycles of “12” (e.g., 3cycles to write data to the cache, 3 cycles to read the data from thecache, 3 cycles to process the data, 3 cycles to rewrite the modifieddata back to the L1 cache). Based on the expected number of CPU cyclesof “12,” a first cache utilization factor of “84” may be computed forthe first cache of the first core. Other methods of computing the firstcache utilization factor for the first cache of the first core of theset of many-core hardware processors are also possible.

At block 732, a second cache utilization factor may be computed. Thesecond cache utilization factor may be computed for a second cache ofthe first core of the set of many-core hardware processors. Thecomputing may be performed for cache management in the stream computingenvironment. Generally, computing can include formulating, calculating,ascertaining, measuring, estimating, or otherwise determining the secondcache utilization factor for the second cache of the first core of theset of many-core hardware processors. The second cache utilizationfactor many include an attribute, condition, property, criterion, orother parameter that characterizes the current or expected usage,performance, or availability of the second cache of the first core ofthe set of many-core hardware processors. For instance, the second cacheutilization factor may indicate the accessibility (e.g., access burden)of the second cache with respect to the stream of tuples (e.g.,quantitatively expressed as an integer between 0 and 100). Inembodiments, computing the second cache utilization factor may includecalculating an expected number of CPU cycles that would be necessary toprocess the stream of tuples using the second cache of the first core,and determining the second cache utilization factor for the second cacheof the first core based on the expected number of CPU cycles (e.g.,where higher expected numbers of CPU cycles correlate with lower cacheutilization factors). As an example, consider that the second cache isan L2 cache. Accordingly, computing may include evaluating the L2 cacheand ascertaining that processing data using the L2 cache may require anexpected number of CPU cycles of “24” (e.g., 7 cycles to write data tothe cache, 7 cycles to read the data from the cache, 3 cycles to processthe data, 7 cycles to rewrite the modified data back to the L2 cache).Based on the expected number of CPU cycles of “24,” a first cacheutilization factor of “59” may be computed for the second cache of thefirst core. Other methods of computing the second cache utilizationfactor for the second cache of the first core of the set of many-corehardware processors are also possible.

At block 740, a tuple-processing hardware-route on the set of many-corehardware processors may be determined. The determining may be performedbased on a cache factor associated with the set of many-core hardwareprocessors. Generally, determining can include formulating, resolving,computing, calculating, identifying, or otherwise ascertaining thetuple-processing hardware route based on the cache factor associatedwith the set of many-core hardware processors. In embodiments,determining the tuple-processing hardware route may include evaluatingthe set of many-core hardware processors with respect to the stream oftuples to ascertain a sequence of cache units (e.g., of one or morecores) that define a path for processing the stream of tuples thatachieves a suitability threshold (e.g., total processing time below athreshold, efficiency above a certain level). Other methods ofdetermining the tuple-processing hardware route on the set of many-corehardware processors are also possible.

At block 741, the tuple-processing hardware-route may be resolved. Theresolving may be performed to prioritize utilization of the first cacheof the first core of the set of many-core hardware processors withrespect to the second cache of the first core of the set of many-corehardware processors. The resolving may be performed by comparing thefirst cache utilization factor for the first cache of the first core ofthe set of many-core hardware processors with the second cacheutilization factor for the second cache of the first core of the set ofmany-core hardware processors. Generally, resolving can includeformulating, ascertaining, computing, calculating, identifying, orotherwise determining the tuple-processing hardware route to prioritizeutilization of the first cache of the first core with respect to thesecond cache of the first core. In embodiments, resolving can includecomparing the first cache utilization factor for the first cache of thefirst core with respect to the second cache utilization factor for thesecond cache of the first core, and selecting the cache having thegreater cache utilization factor (e.g., lower expected number of CPUcycles) for use to process the stream of tuples. Consider the exampledescribed herein in which a first cache of an L1 cache and a secondcache of an L2 cache are located on the first core (e.g., locally placedon the same core of the same processor). As described herein, the firstcache utilization factor of “84” for the L1 cache (e.g., first cache) ofthe first core may be compared with the second cache utilization factorof “59” for the L2 cache (e.g., second cache) of the first core, and thefirst cache of the first core may be ascertained for use to facilitateprocessing of the stream of tuples (e.g., the L1 cache is faster thanthe L2 cache, requiring half the number of CPU cycles to process thestream of tuples). Accordingly, a tuple-processing hardware-route totransfer the stream of tuples to the L1 cache of the first core forprocessing may be determined. Other methods of resolving thetuple-processing hardware-route to prioritize utilization of the firstcache of the first core with respect to the first cache of the firstcore are also possible.

In embodiments, it may be ascertained that a second cache access burdenof the second cache of the first core of the set of many-core hardwareprocessors exceeds a first cache access burden of the first cache of thefirst core of the set of many-core hardware processors at block 744. Theascertaining may be performed as part of cache management in the streamcomputing environment. Generally, ascertaining can include formulating,resolving, computing, calculating, identifying, or otherwise determiningthat the second cache access burden of the second cache of the firstcore exceeds the first cache access burden of the first cache of thefirst core. The first and second cache access burdens may indicate thecost or expense (e.g., in terms of time or system resources) forutilizing the first and second caches, respectively. In embodiments, thefirst and second cache access burdens may be expressed using a number ofCPU clock cycles that are necessary to perform read or write operationsusing the first and second caches. In embodiments, ascertaining that thesecond cache access burden of the second cache of the first core exceedsthe first cache access burden of the first cache of the first core mayinclude performing a test operation to read and write a set of data toboth the second cache of the first core and the first cache of the firstcore, and measuring the number of CPU clock cycles that are necessary tocomplete the operation. As an example, in embodiments, a test operationmay be performed with respect to an L2 cache (e.g., second cache) of thefirst core and the L1 cache (e.g., first cache) of the first core, andit may be calculated that it takes 7 CPU clock cycles to write data tothe L2 cache of the first core, and 3 CPU clock cycles to write data tothe L1 cache of the first core. Accordingly, based on the testoperation, it may be determined that the second cache access burden ofthe second cache of the first core is greater than the first cacheaccess burden of the first cache of the first core. Other methods ofascertaining that the second cache access burden of the second cache ofthe first core exceeds the first cache access burden of the first cacheof the first core are also possible.

At block 760, the stream of tuples may be routed. The routing may beperformed based on the tuple-processing hardware-route on the set ofmany-core hardware processors. Generally, routing can include conveying,relaying, transferring, conducting, sending, or otherwise directing thestream of tuples based on the tuple-processing hardware-route on the setof many-core hardware processors. In embodiments, routing the stream oftuples may include identifying a network path address for each hardwarecomponent (e.g., cache) designated by the tuple-processinghardware-route, ascertaining one or more communication buses that may beused to transfer the stream of tuples between each respective componentof the tuple-processing hardware-route, and subsequently transmittingthe stream of tuples to each hardware component of the tuple-processinghardware-route using the identified communication buses and network pathaddresses. Other methods of routing the stream of tuples based on thetuple-processing hardware-route are also possible.

At block 771, the first cache of the first core of the set of many-corehardware processors may be prioritized. The first cache may beprioritized with respect to the second cache of the first core of theset of many-core hardware processors. The prioritizing may pertain toprocessing the stream of tuples utilizing the set of many-core hardwareprocessors. Generally, prioritizing can include arranging, ordering,ranking, organizing, or otherwise giving preference to the first cacheof the first core to process the stream of tuples. In embodiments,prioritizing may include generating a cache utilization hierarchy thatdefines the order of priority or preference in which the caches of theset of many-core hardware processors should be used to process thestream of tuples. Accordingly, the first cache of the first core may beassigned a position in the cache utilization hierarchy that indicatesgreater priority or preference than the second cache of the first core.Again consider the example described herein in which a first cache of anL1 cache and a second cache of an L2 cache are located on the first core(e.g., locally placed on the same core of the same processor). Asdescribed herein, in response to resolving the tuple-processinghardware-route to prioritize utilization of the first cache of the firstcore with respect to the second cache of the first core (e.g., as thefirst cache had the greater cache utilization factor) a cacheutilization hierarchy may be generated in which the L1 cache of thefirst core is assigned a priority level of “1” and the L2 cache of thefirst core is assigned a priority level of “2” (e.g., where lowerpriority levels indicate greater usage preference). Accordingly, thestream of tuples may be processed based on the cache utilizationhierarchy such that the L1 cache of the first core is given preferencefor tuple processing (e.g., and the L2 cache of the first core is usedas a backup). Other methods of prioritizing the first cache of the firstcore with respect to the second cache of the first core are alsopossible.

At block 780, the stream of tuples may be processed. The stream oftuples may be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors. The processing maybe performed utilizing the set of many-core hardware processors.Generally, processing can include analyzing, evaluating, altering,investigating, examining, modifying, or otherwise managing the stream oftuples. Processing the stream of tuples may include using one or moreprocessor elements placed on the set of many-core hardware processors toperform a series of processing operations on the stream of tuples toconvert input tuples to output tuples. Other methods of processing thestream of tuples by the plurality of processing elements which operateon the set of many-core hardware processors are also possible.

Method 700 concludes at block 799. Aspects of method 700 may provideperformance or efficiency benefits related to cache management.Altogether, leveraging processor architecture information and streamapplication characteristics with respect to cache management may beassociated with benefits such as stream application performance, cachehit rates, and processing efficiency. Aspects may save resources such asbandwidth, disk, processing, or memory.

FIG. 8 is a flowchart illustrating a method 800 for cache management ina stream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of method 800 relate to resolving thetuple-processing hardware route to prioritize utilization of a secondcache of a second core of the set of many core hardware processors basedon computation of utilization factors for the first cache of the firstcore and the second cache of the second core. Aspects of method 800 maybe similar or the same as aspects of method 600/700, and aspects may beutilized interchangeably. The method 800 may begin at block 801.

In embodiments, it may be ascertained that a second cache size of thesecond cache of the second core of the set of many-core hardwareprocessors exceeds a first cache size of the first cache of the firstcore of the set of many-core hardware processors at block 814.Generally, ascertaining can include formulating, resolving, computing,calculating, identifying, or otherwise determining that the second cachesize of the second cache of the second core exceeds the first cache sizeof the first cache of the first core. The first and second cache sizesmay indicate the amount of data storage space available to the first andsecond caches, respectively. In embodiments, ascertaining may includeusing a system hardware diagnostic to examine the first cache size withrespect to the second cache size, and determining that the magnitude ofthe data storage space allocated for use by the second cache is greaterthan the magnitude of the data storage space allocated for use by thefirst cache. As an example, in embodiments, an L1 cache (e.g., firstcache) of the first core may be compared with an L2 cache (e.g., secondcache) of the second core, and it may be ascertained that the L2 cachehas a size of “3 megabytes,” which exceeds the L1 cache size of “32kilobytes.” As another example, an L2 cache (e.g., first cache) of thesecond core may be compared with an L3 cache (e.g., second cache), andit may be ascertained that the L3 cache has a size of “32 megabytes,”which exceeds the L2 cache size of “3 megabytes.” Other methods ofascertaining that the second cache size of the second cache of thesecond core exceeds the first cache size of the first cache of the firstcore are also possible.

At block 820, the stream of tuples may be received. The stream of tuplesmay be received to be processed by the plurality of processing elementswhich operate on the set of many-core hardware processors. Generally,receiving can include sensing, detecting, recognizing, identifying,collecting, or otherwise accepting delivery of the stream of tuples. Inembodiments, receiving may include detecting an incoming set of inputtuples with respect to a particular core or cores of the set ofmany-core hardware processors. Other methods of receiving the stream oftuples to be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors are also possible.

At block 831, a first cache utilization factor for a first cache of afirst core of the set of many-core hardware processors may be computed.The computing may be performed for cache management in the streamcomputing environment. Generally, computing can include formulating,calculating, ascertaining, measuring, estimating, or otherwisedetermining the first cache utilization factor for the first cache ofthe first core of the set of many-core hardware processors. The firstcache utilization factor may include an attribute, condition, property,criterion, or other parameter that characterizes the current or expectedusage, performance, or availability of the first cache of the first coreof the set of many-core hardware processors. For instance, the firstcache utilization factor may indicate the accessibility (e.g., accessburden) of the first cache with respect to the stream of tuples. Inembodiments, the first cache utilization factor may be quantitativelyexpressed as an integer between 0 and 100, where greater values indicategreater suitability (e.g., easier access, faster expected processing)for processing the stream of tuples. In embodiments, computing the firstcache utilization factor may include calculating an expected number ofCPU cycles that would be necessary to process the stream of tuples usingthe first cache of the first core, and determining the first cacheutilization factor for the first cache of the first core based on theexpected number of CPU cycles (e.g., where higher expected numbers ofCPU cycles correlate with lower cache utilization factors). As anexample, consider a situation in which a stream of tuples is maintainedin a first cache (e.g., L1 cache) of a second core of the set ofmany-core hardware processors (e.g., such that the stream of tupleswould need to be transferred from the second core to the first core forprocessing). Computing may include taking into account the physicaldistance between the first cache of the second core and the first cacheof the first core, the time to transfer the tuples, expected time toprocess the stream of tuples using the first cache of the first core,and other factors to calculate an expected number of CPU cycles of “21”(e.g., 3 CPU cycles to read the tuples from the first cache of the firstcore, 7 cycles to transfer the tuples from the first core to the second,3 cycles to write the tuples to the first cache of the first core, 3cycles to read the tuples from the first cache, 3 cycles to process thetuples, and 3 cycles to re-write the modified tuples back to the firstcache). In embodiments, a first cache utilization factor of “66” may becomputed for the first cache of the first core. Other methods ofcomputing the first cache utilization factor for the first cache of thefirst core of the set of many-core hardware processors are alsopossible.

At block 832, a second cache utilization factor for a second cache of asecond core of the set of many-core hardware processors may be computed.The computing may be performed for cache management in the streamcomputing environment. Generally, computing can include formulating,calculating, ascertaining, measuring, estimating, or otherwisedetermining the second cache utilization factor for the second cache ofthe second core of the set of many-core hardware processors. The secondcache utilization factor many include an attribute, condition, property,criterion, or other parameter that characterizes the current or expectedusage, performance, or availability of the second cache of the secondcore of the set of many-core hardware processors. For instance, thesecond cache utilization factor may indicate the accessibility (e.g.,access burden) of the second cache with respect to the stream of tuples(e.g., quantitatively expressed as an integer between 0 and 100). Inembodiments, computing the second cache utilization factor may includecalculating an expected number of CPU cycles that would be necessary toprocess the stream of tuples using the second cache of the second core,and determining the second cache utilization factor for the second cacheof the second core based on the expected number of CPU cycles (e.g.,where higher expected numbers of CPU cycles correlate with lower cacheutilization factors). For instance, with reference to the previousexample, consider that the stream of tuples is maintained in a firstcache (e.g., L1 cache) of a second core of the set of many-core hardwareprocessors (e.g., such that the stream of tuples are located on the samecore as the second cache). Computing may include taking into account thephysical distance between the first cache of the second core and thesecond cache of the second core, the time to transfer the tuples,expected time to process the stream of tuples using the second cache ofthe second core, and other factors to calculate an expected number ofCPU cycles of “10” (e.g., 3 cycles to read the tuples from the firstcache of the second core, 7 cycles to write the tuples to the secondcache of the second core). In embodiments, a second cache utilizationfactor of “91” may be computed for the second cache of the second core.Other methods of computing the second cache utilization factor for thesecond cache of the second core of the set of many-core hardwareprocessors are also possible.

In embodiments, it may be detected that the first cache utilizationfactor for the first cache of the first core of the set of many-corehardware processors includes a data transfer factor at block 836. Thedetecting may be performed for cache management in the stream computingenvironment. Generally, detecting can include sensing, discovering,recognizing, resolving, identifying, or otherwise ascertaining that thefirst cache utilization factor indicates the data transfer factor. Thedata transfer factor may include an attribute, property, orcharacteristic that indicates a burden of data movement between thecaches of the first and second cores. The data transfer factor mayrepresent the cost in terms of time, bandwidth, CPU clock cycles, orother system resources incurred by transferring data between caches ofthe first and second cores. In embodiments, detecting may includecomputing the data transfer factor based on the physical distancebetween the first and second cores on a physical processor (e.g.,integrated circuit), the bandwidth necessary to transmit data betweenthe first and second cores, and the number of CPU clock cycles used toread data from the cache on the first core and write it to the cache onthe second core. As an example, in certain embodiments, it may bedetermined that transferring data from an L1 cache of a first core to anL2 cache of a second core may result in usage of 17 CPU clock cycles,0.4 seconds, and 48 kilobytes of network bandwidth. Other methods ofdetecting that the first cache utilization factor includes the datatransfer factor are also possible.

At block 840, a tuple-processing hardware-route on the set of many-corehardware processors may be determined. The determining may be performedbased on a cache factor associated with the set of many-core hardwareprocessors. Generally, determining can include formulating, resolving,computing, calculating, identifying, or otherwise ascertaining thetuple-processing hardware route based on the cache factor associatedwith the set of many-core hardware processors. In embodiments,determining the tuple-processing hardware route may include evaluatingthe set of many-core hardware processors with respect to the stream oftuples to ascertain a sequence of cache units (e.g., of one or morecores) that define a path for processing the stream of tuples thatachieves a suitability threshold (e.g., total processing time below athreshold, efficiency above a certain level). Other methods ofdetermining the tuple-processing hardware route on the set of many-corehardware processors are also possible.

At block 841, the tuple-processing hardware-route may be resolved. Theresolving may be performed to prioritize utilization of the second cacheof the second core of the set of many-core hardware processors withrespect to the first cache of the first core of the set of many-corehardware processors. The resolving may be performed by comparing thefirst cache utilization factor for the first cache of the first core ofthe set of many-core hardware processors with the second cacheutilization factor for the second cache of the second core of the set ofmany-core hardware processors. Generally, resolving can includeformulating, ascertaining, computing, calculating, identifying, orotherwise determining the tuple-processing hardware route to prioritizeutilization of the second cache of the second core with respect to thefirst cache of the first core. In embodiments, resolving can includecomparing the first cache utilization factor for the first cache of thefirst core with respect to the second cache utilization factor for thesecond cache of the second core, and selecting the cache having thegreater cache utilization factor (e.g., lower expected number of CPUcycles) for use to process the stream of tuples. Consider again theexample described herein in which the stream of tuples is maintained inthe first cache (e.g., L1 cache) of a second core of the set ofmany-core hardware processors (e.g., such that the stream of tuples arelocated on the same core as the second cache). As described herein, thefirst cache utilization factor of “66” for the L1 cache (e.g., firstcache) of the first core may be compared with the second cacheutilization factor of “91” for the L2 cache (e.g., second cache) of thesecond core, and the second cache of the second core may be ascertainedfor use to facilitate processing of the stream of tuples (e.g., althoughthe L1 cache of the first core is faster, using the L2 cache on the samecore as the tuples are located saves transfer time and results in fasteroverall processing). Accordingly, a tuple-processing hardware-route totransfer the stream of tuples from the L1 cache of the second core tothe L2 cache of the second core for processing may be determined. Othermethods of resolving the tuple-processing hardware-route to prioritizeutilization of the second cache of the second core with respect to thefirst cache of the first core are also possible.

In embodiments, it may be ascertained that a second cache access burdenof the second cache of the second core of the set of many-core hardwareprocessors exceeds a first cache access burden of the first cache of thefirst core of the set of many-core hardware processors at block 844. Theascertaining may be performed for cache management in the streamcomputing environment. Generally, ascertaining can include formulating,resolving, computing, calculating, identifying, or otherwise determiningthat the second cache access burden of the second cache of the secondcore exceeds the first cache access burden of the first cache of thefirst core. The first and second cache access burdens may indicate thecost or expense (e.g., in terms of time or system resources) forutilizing the first and second caches, respectively. In embodiments, thefirst and second cache access burdens may be expressed using a number ofCPU clock cycles that are necessary to perform read or write operationsusing the first and second caches. In embodiments, ascertaining that thesecond cache access burden of the second cache of the second coreexceeds the first cache access burden of the first cache of the firstcore may include performing a test operation to read and write a set ofdata to both the second cache of the second core and the first cache ofthe first core, and measuring the number of CPU clock cycles that arenecessary to complete the operation. As an example, in embodiments, atest operation may be performed with respect to an L2 cache (e.g.,second cache) of the second core and the L1 cache (e.g., first cache) ofthe first core, and it may be calculated that it takes 10 CPU clockcycles to write data to the L2 cache of the second core, and 2 CPU clockcycles to write data to the L1 cache of the first core. Accordingly,based on the test operation, it may be determined that the second cacheaccess burden of the second cache of the second core is greater than thefirst cache access burden of the first cache of the first core. Othermethods of ascertaining that the second cache access burden of thesecond cache of the second core exceeds the first cache access burden ofthe first cache of the first core are also possible.

At block 860, the stream of tuples may be routed. The routing may beperformed based on the tuple-processing hardware-route on the set ofmany-core hardware processors. Generally, routing can include conveying,relaying, transferring, conducting, sending, or otherwise directing thestream of tuples based on the tuple-processing hardware-route on the setof many-core hardware processors. In embodiments, routing the stream oftuples may include identifying a network path address for each hardwarecomponent (e.g., cache) designated by the tuple-processinghardware-route, ascertaining one or more communication buses that may beused to transfer the stream of tuples between each respective componentof the tuple-processing hardware-route, and subsequently transmittingthe stream of tuples to each hardware component of the tuple-processinghardware-route using the identified communication buses and network pathaddresses. Other methods of routing the stream of tuples based on thetuple-processing hardware-route are also possible.

At block 871, the second cache of the second core of the set ofmany-core hardware processors may be prioritized. The second cache maybe prioritized with respect to the first cache of the first core of theset of many-core hardware processors. The prioritizing may pertain toprocessing the stream of tuples utilizing the set of many-core hardwareprocessors. Generally, prioritizing can include arranging, ordering,ranking, organizing, or otherwise giving preference to the second cacheof the second core to process the stream of tuples. In embodiments,prioritizing may include generating a cache utilization hierarchy thatdefines the order of priority or preference in which the caches of theset of many-core hardware processors should be used to process thestream of tuples. Accordingly, the second cache of the second core maybe assigned a position in the cache utilization hierarchy that indicatesgreater priority or preference than the first cache of the first core.Again consider the example described herein in which the stream oftuples is maintained in the first cache (e.g., L1 cache) of the secondcore of the set of many-core hardware processors (e.g., such that thestream of tuples are located on the same core as the second cache). Asdescribed herein, in response to resolving the tuple-processinghardware-route to prioritize utilization of the second cache of thesecond core with respect to the first cache of the first core (e.g., asthe second cache had the greater cache utilization factor) a cacheutilization hierarchy may be generated in which the L2 cache of thesecond core is assigned a priority level of “1” and the L1 cache of thefirst core is assigned a priority level of “2” (e.g., where lowerpriority levels indicate greater usage preference). Accordingly, thestream of tuples may be processed based on the cache utilizationhierarchy such that the L2 cache of the second core is given preferencefor tuple processing (e.g., and the L1 cache of the first core is usedas a backup). Other methods of prioritizing the second cache of thesecond core with respect to the first cache of the first core are alsopossible.

At block 880, the stream of tuples may be processed. The stream oftuples may be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors. The processing maybe performed utilizing the set of many-core hardware processors.Generally, processing can include analyzing, evaluating, altering,investigating, examining, modifying, or otherwise managing the stream oftuples. Processing the stream of tuples may include using one or moreprocessor elements placed on the set of many-core hardware processors toperform a series of processing operations on the stream of tuples toconvert input tuples to output tuples. Other methods of processing thestream of tuples by the plurality of processing elements which operateon the set of many-core hardware processors are also possible.

Method 800 concludes at block 899. Aspects of method 800 may provideperformance or efficiency benefits related to cache management.Altogether, leveraging processor architecture information and streamapplication characteristics with respect to cache management may beassociated with benefits such as stream application performance, cachehit rates, and processing efficiency. Aspects may save resources such asbandwidth, disk, processing, or memory.

FIG. 9 is a flowchart illustrating a method 900 for cache management ina stream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of method 900 relate to resolving thetuple-processing hardware-route to prioritize utilization of a thirdcache of a first core of the set of many-core hardware processors basedon computation of utilization factors for the third cache of the firstcore and the third cache of the second core. Aspects of method 900 maybe similar or the same as aspects of method 600/700/800, and aspects maybe utilized interchangeably. The method 900 may begin at block 901.

In embodiments, it may be detected that the third cache of the firstcore of the set of many-core hardware processors is shared with a thirdcore of the set of many-core hardware processors at block 916. Thedetecting may be performed for cache management in the stream computingenvironment. Generally, detecting can include sensing, discovering,recognizing, resolving, identifying, or otherwise ascertaining that thethird cache of the first core is shared with a third core of the set ofmany-core hardware processors. In embodiments, detecting may includeexamining the physical processor architecture of the set of many-corehardware processors, and identifying that both the first core and thethird core of a first processor are communicatively connected with thethird cache (e.g., have system bus connections linked with the thirdcache). As an example, detecting may include utilizing a data trafficdiagnostic tool to analyze the flow of data on an L3 cache of a firstprocessor, and determining that both the first core and the third coreof the first processor make use of the L3 cache for data transfer andcommunication (e.g., of streams of tuples). Other methods of detectingthat the third cache of the first core is shared with the third core arealso possible.

In embodiments, it may be detected that the third cache of the secondcore of the set of many-core hardware processors is neither shared withthe first core of the set of many-core hardware processors nor the thirdcore of the set of many-core hardware processors at block 917. Thedetecting may be performed for cache management in the stream computingenvironment. Generally, detecting can include sensing, discovering,recognizing, resolving, identifying, or otherwise ascertaining that thethird cache of the second core of the set of many-core hardwareprocessors is neither shared with the first core or the third core ofthe set of many-core hardware processors. In embodiments, detecting mayinclude examining the physical processor architecture of the set ofmany-core hardware processors, and identifying that a third cache of asecond processor does not maintain system bus connections or othercommunication links with the first or third cores (e.g., of the firstprocessor). As an example, in certain embodiments, detecting may includeascertaining that an L3 cache of a first processor and an L3 cache ofthe second processor do share communication connections to cores onother processors (e.g., cores on a particular processor are onlyconnected to the L3 cache on that respective processor). Other methodsof detecting that the third cache of the second core of the set ofmany-core hardware processors is neither shared with the first core ofthe set of many-core hardware processors nor the third core of the setof many-core hardware processors are also possible.

At block 920, the stream of tuples may be received. The stream of tuplesmay be received to be processed by the plurality of processing elementswhich operate on the set of many-core hardware processors. Generally,receiving can include sensing, detecting, recognizing, identifying,collecting, or otherwise accepting delivery of the stream of tuples. Inembodiments, receiving may include detecting an incoming set of inputtuples with respect to a particular core or cores of the set ofmany-core hardware processors. Other methods of receiving the stream oftuples to be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors are also possible.

At block 931, a third cache utilization factor for a third cache of afirst core of the set of many-core hardware processors may be computed.The computing may be performed for cache management in the streamcomputing environment. Generally, computing can include formulating,calculating, ascertaining, measuring, estimating, or otherwisedetermining the third cache utilization factor for the third cache ofthe first core of the set of many-core hardware processors. The thirdcache utilization factor may include an attribute, condition, property,criterion, or other parameter that characterizes the current or expectedusage, performance, or availability of the third cache of the first coreof the set of many-core hardware processors. For instance, the firstcache utilization factor may indicate the availability (e.g., degree ofcongestion) of the third cache with respect to the stream of tuples. Inembodiments, the third cache utilization factor may be quantitativelyexpressed as an integer between 0 and 100, where greater values indicategreater suitability (e.g., easier access, faster expected processing)for processing the stream of tuples. In embodiments, computing the thirdcache utilization factor for the third cache of the first core mayinclude calculating an expected number of CPU cycles that would benecessary to process the stream of tuples using the third cache of thefirst core, and determining the third cache utilization factor for thethird cache of the first core based on the expected number of CPU cycles(e.g., where higher expected numbers of CPU cycles correlate with lowercache utilization factors). As an example, consider a situation in whicha stream of tuples is undergoing processing operations in an L2 cache(e.g., second cache) of the first core, and the third cache of the firstcore is an L3 cache. Computing may include taking into account thephysical distance between the L3 cache of the first core and the L2cache of the first core, the time to transfer the tuples, the expectedtime to process the stream of tuples using the L3 cache of the firstcore, and other factors to calculate an expected number of CPU cycles of“126” (e.g., 3 cycles to transfer from the L2 cache to the L3 cache, 40cycles to write to the L3 cache, 40 cycles to read from the L3 cache, 3cycles to process the stream of tuples, 40 cycles to rewrite themodified stream of tuples to the L3 cache). In embodiments, a thirdcache utilization factor of “46” may be computed for the third cache ofthe first core. Other methods of computing the third cache utilizationfactor for the third cache of the first core of the set of many-corehardware processors are also possible.

At block 932, a third cache utilization factor for a third cache of asecond core of the set of many-core hardware processors may be computed.The third cache of the first core is a different physical cache from thethird cache of the second core. The computing may be performed for cachemanagement in the stream computing environment. Generally, computing caninclude formulating, calculating, ascertaining, measuring, estimating,or otherwise determining the third cache utilization factor for thethird cache of the second core of the set of many-core hardwareprocessors. The third cache utilization factor many include anattribute, condition, property, criterion, or other parameter thatcharacterizes the current or expected usage, performance, oravailability of the third cache of the second core of the set ofmany-core hardware processors. For instance, the third cache utilizationfactor may indicate the availability (e.g., degree of congestion) of thethird cache with respect to the stream of tuples (e.g., quantitativelyexpressed as an integer between 0 and 100). In embodiments, the thirdcache of the first core may be a different physical cache from the thirdcache of the second core. As an example, in certain embodiments, thethird cache of the first core may be located on a first hardwareprocessor and the third cache of the second core may be located on asecond hardware processor (e.g., such that the third caches are locatedon separate physical hardware units). In embodiments, computing thethird cache utilization factor for the third cache of the second coremay include calculating an expected number of CPU cycles that would benecessary to process the stream of tuples using the third cache of thesecond core, and determining the third cache utilization factor for thethird cache of the second core based on the expected number of CPUcycles (e.g., where higher expected numbers of CPU cycles correlate withlower cache utilization factors). For instance, with reference to theprevious example, consider that the stream of tuples is undergoingprocessing operations in an L2 cache (e.g., second cache) of the firstcore, and the third cache of the second core is an L3 cache (e.g., suchthat the stream of tuples and the L3 cache). Computing may includetaking into account the physical distance between the L2 cache of thefirst core and the L3 cache of the second core, the time to transfer thetuples, expected time to process the stream of tuples using the thirdcache of the second core, and other factors to calculate an expectednumber of CPU cycles of “200” (e.g., 7 cycles to read from the L2 cache,70 cycles to transfer from the L2 cache on the first core to the L3cache on the second core, 40 cycles to write to the L3 cache, 40 cyclesto read from the L3 cache, 3 cycles to process the stream of tuples, 40cycles to rewrite the modified stream of tuples to the L3 cache). Inembodiments, a second cache utilization factor of “21” may be computedfor the third cache of the second core. Other methods of computing thethird cache utilization factor for the third cache of the second core ofthe set of many-core hardware processors are also possible.

At block 940, a tuple-processing hardware-route on the set of many-corehardware processors may be determined. The determining may be performedbased on a cache factor associated with the set of many-core hardwareprocessors. Generally, determining can include formulating, resolving,computing, calculating, identifying, or otherwise ascertaining thetuple-processing hardware route based on the cache factor associatedwith the set of many-core hardware processors. In embodiments,determining the tuple-processing hardware route may include evaluatingthe set of many-core hardware processors with respect to the stream oftuples to ascertain a sequence of cache units (e.g., of one or morecores) that define a path for processing the stream of tuples thatachieves a suitability threshold (e.g., total processing time below athreshold, efficiency above a certain level). Other methods ofdetermining the tuple-processing hardware route on the set of many-corehardware processors are also possible.

At block 941, the tuple-processing hardware-route may be resolved. Theresolving may be performed to prioritize utilization of the third cacheof the first core of the set of many-core hardware processors withrespect to the third cache of the second core of the set of many-corehardware processors. The resolving may be performed by comparing thethird cache utilization factor for the third cache of the first core ofthe set of many-core hardware processors with the third cacheutilization factor for the third cache of the second core of the set ofmany-core hardware processors. Generally, resolving can includeformulating, ascertaining, computing, calculating, identifying, orotherwise determining the tuple-processing hardware route to prioritizeutilization of the third cache of the first core with respect to thethird cache of the second core. In embodiments, resolving can includecomparing the third cache utilization factor for the third cache of thefirst core with respect to the third cache utilization factor for thethird cache of the second core, and selecting the cache having thegreater cache utilization factor (e.g., lower expected number of CPUcycles) for use to process the stream of tuples. Consider again theexample described herein in which the stream of tuples is undergoingprocessing operations in an L2 cache (e.g., second cache) of the firstcore, and both the third cache of the first core and the third cache ofthe second core are L3 caches (e.g., such that the stream of tuples andthe L3 cache are located on different cores). As described herein, thethird cache utilization factor of “46” for the L3 cache of the firstcore may be compared with the second cache utilization factor of “21”for the L3 cache of the second core, and the third cache of the firstcore may be ascertained for use to facilitate processing of the streamof tuples (e.g., using the L3 cache on the same core as the stream oftuples may avoid the need to transfer the tuples, resulting in fasteroverall processing). Accordingly, a tuple-processing hardware-route totransfer the stream of tuples from the L2 cache of the first core to theL3 cache of the first core for processing may be determined. Othermethods of resolving the tuple-processing hardware-route to prioritizeutilization of the third cache of the first core with respect to thethird cache of the second core are also possible.

At block 960, the stream of tuples may be routed. The routing may beperformed based on the tuple-processing hardware-route on the set ofmany-core hardware processors. Generally, routing can include conveying,relaying, transferring, conducting, sending, or otherwise directing thestream of tuples based on the tuple-processing hardware-route on the setof many-core hardware processors. In embodiments, routing the stream oftuples may include identifying a network path address for each hardwarecomponent (e.g., cache) designated by the tuple-processinghardware-route, ascertaining one or more communication buses that may beused to transfer the stream of tuples between each respective componentof the tuple-processing hardware-route, and subsequently transmittingthe stream of tuples to each hardware component of the tuple-processinghardware-route using the identified communication buses and network pathaddresses. Other methods of routing the stream of tuples based on thetuple-processing hardware-route are also possible.

At block 971, the third cache of the first core of the set of many-corehardware processors may be prioritized. The third cache of the firstcore may be prioritized with respect to the third cache of the secondcore of the set of many-core hardware processors. The prioritizing maypertain to processing the stream of tuples utilizing the set ofmany-core hardware processors. Generally, prioritizing can includearranging, ordering, ranking, organizing, or otherwise giving preferenceto the third cache of the first core to process the stream of tuples. Inembodiments, prioritizing may include generating a cache utilizationhierarchy that defines the order of priority or preference in which thecaches of the set of many-core hardware processors should be used toprocess the stream of tuples. Accordingly, the third cache of the firstcore may be assigned a position in the cache utilization hierarchy thatindicates greater priority or preference than the third cache of thesecond core. Again consider the example described herein in which thestream of tuples is undergoing processing operations in an L2 cache(e.g., second cache) of the first core, and both the third cache of thefirst core and the third cache of the second core are L3 caches (e.g.,such that the stream of tuples and the L3 cache are located on differentcores). As described herein, in response to resolving thetuple-processing hardware-route to prioritize utilization of the L3cache of the first core with respect to the L3 cache of the second core(e.g., as the L3 on the first core had the greater cache utilizationfactor) a cache utilization hierarchy may be generated in which the L3cache of the first core is assigned a priority level of “1” and the L3cache of the second core is assigned a priority level of “2” (e.g.,where lower priority levels indicate greater usage preference).Accordingly, the stream of tuples may be processed based on the cacheutilization hierarchy such that the L3 cache of the first core is givenpreference for tuple processing (e.g., and the L3 cache of the secondcore is used as a backup). Other methods of prioritizing the third cacheof the first core with respect to the third cache of the second core arealso possible.

At block 980, the stream of tuples may be processed. The stream oftuples may be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors. The processing maybe performed utilizing the set of many-core hardware processors.Generally, processing can include analyzing, evaluating, altering,investigating, examining, modifying, or otherwise managing the stream oftuples. Processing the stream of tuples may include using one or moreprocessor elements placed on the set of many-core hardware processors toperform a series of processing operations on the stream of tuples toconvert input tuples to output tuples. Other methods of processing thestream of tuples by the plurality of processing elements which operateon the set of many-core hardware processors are also possible.

Method 900 concludes at block 999. Aspects of method 900 may provideperformance or efficiency benefits related to cache management.Altogether, leveraging processor architecture information and streamapplication characteristics with respect to cache management may beassociated with benefits such as stream application performance, cachehit rates, and processing efficiency. Aspects may save resources such asbandwidth, disk, processing, or memory.

FIG. 10 depicts an example system 1000 for cache management in a streamcomputing environment that uses a set of many-core hardware processorsto process a stream of tuples by a plurality of processing elementswhich operate on the set of many-core hardware processors, according toembodiments. The example system 1000 may include a processor 1006 and amemory 1008 to facilitate implementation of cache management. Theexample system 1000 may include a database 1002 configured to maintaindata used for cache management. In embodiments, the example system 1000may include a cache management system 1005. The cache management system1005 may be communicatively connected to the database 1002, and beconfigured to receive data 1004 related to cache management. The cachemanagement system 1005 may include a receiving module 1020 to receivethe stream of tuples, a determining module 1040 to determine atuple-processing hardware-route, a routing module 1060 to route thestream of tuples, and a processing module 1080 to process the stream oftuples. The cache management system 1005 may be communicativelyconnected with a module management system 1010 that includes a set ofmodules for implementing aspects of cache management.

In embodiments, it may be detected that the set of many-core hardwareprocessors is selected from a group. In embodiments, the set ofmany-core hardware processors may include one or more ring architecturesat module 1011. The ring architecture may include a processorinfrastructure for facilitating data protection and fault toleranceusing a set of protection rings to manage access to different levels ofsystem resources. The set of protection rings may include one or morehardware-reinforced hierarchical levels or layers of privilege withinthe computer system. The set of protection rings may be arranged in ahierarchy from most privileged to least privileged (e.g., Ring 0 may bethe most privileged, and interact directly with physical hardware suchas CPU and memory). The set of protection rings may be used to manage(e.g., gate, limit) access to system resources (e.g., device drivers,CPU, memory). In embodiments, the set of many-core hardware processorsmay include one or more two-dimensional mesh architectures at module1012. The two-dimensional mesh architecture may include a processorinfrastructure including an array of processor nodes which form atwo-dimensional grid where each node is connected to four adjacentrouting nodes (e.g., nodes at the edges may only have two or threeconnections). In embodiments, the set of many-core hardware processorsmay include one or more three-dimensional mesh architectures at module1013. The three-dimensional architecture may include a processorinfrastructure including an array of processor nodes which form athree-dimensional grid. Each node of the three-dimensional grid may beconnected to 5 or 6 connections to other nodes of the grid. Inembodiments, the set of many-core hardware processors may include one ormore torus architectures at module 1014. The torus architecture mayinclude a processor infrastructure including an array of processor nodeswhich form a regular cyclic two-dimensional grid. The torus architecturemay include wrap-around edges such that nodes at the edge of the gridmay be connected to those nodes in a corresponding location on the otherside of the grid. Other types of processor architectures for the set ofmany-core hardware processors are also possible.

In embodiments, the cache factor associated with the set of many-corehardware processors may be configured at module 1016. The cache factormay be configured to include a set of physical distances between aplurality of cores of the set of many-core hardware processors. Theconfiguring may be performed for cache management in the streamcomputing environment. Generally, configuring can include formulating,arranging, calculating, setting-up, computing, or otherwise organizingthe cache factor to include the set of physical distances. The set ofphysical distances may include the length of a path between the one ormore cores of the set of many-core hardware processors. In embodiments,the set of physical distances may indicate the length of the pathbetween two cores located on the same processor (e.g., a first core anda second core of a first processor). For instance, configuring mayinclude ascertaining a physical distance between two cores located onthe same processor of “5 millimeters.” In embodiments, the set ofphysical distances may indicate the length of the path between two coreslocated on separate processors (e.g., a first core on a first processorand a second core on a second processor). As an example, configuring mayinclude computing a physical distance between two cores located onseparate processors of “10 centimeters.” In embodiments, configuring mayinclude factoring in (e.g., taking into consideration) the set ofphysical distances between processor cores when calculating the cachefactor (e.g., a shorter physical distance may be associated with fasterprocessing time). Other methods of configuring the cache factor toinclude the set of physical distances between a plurality of cores ofthe set of many-core hardware processors are also possible.

In embodiments, the tuple-processing hardware-route on the set ofmany-core hardware processors may be determined at module 1034. Thetuple-processing hardware-route may be determined using the set ofphysical distances. The determining may be performed to route the streamof tuples a shorter distance between cores. Generally, determining caninclude formulating, resolving, computing, calculating, identifying, orotherwise ascertaining to route the stream of tuples a shorter distancebetween cores using the set of physical distances. In embodiments,determining may include examining the set of physical distances betweenthe current location of the stream of tuples and one or more cores ofthe set of many-core hardware processors, and selecting atuple-processing hardware route that achieves a physical distance lessthan a routing distance threshold. Consider the following example. A setof tuples may be located in a second cache (e.g., L2 cache) of a thirdcore of a fourth processor. Accordingly, a set of physical distancesbetween the second cache of the third core of the fourth processor andother cores of the set of many-core hardware processors may be examined.For example, it may be determined that a fourth core of the fourthprocessor is 5 millimeters from the third core of the fourth processor,a first core of a second processor is 7 centimeters from the third coreof the fourth processor, and a fifth core of a third processor is 11centimeters from the third core of the fourth processor. Accordingly,the physical distances for each potential route may be compared withrespect to a routing distance threshold of “2 centimeters” and thefourth core of the fourth processor may be selected to process the setof tuples (e.g., 5 millimeters is the only distance that achieves therouting distance threshold). As such, the set of tuples may be routed tothe fourth core of the fourth processor for processing (e.g., therebyusing less bandwidth, decreasing excess traffic, reducing wait times forprocessing tuples). Other methods of determining the tuple-processinghardware route to route the stream of tuples a shorter distance betweencores are also possible.

In embodiments, an expected data rate may be calculated at module 1041.The expected data rate may be calculated for operation of a plurality ofsequential stream operators. The calculating may be performed for cachemanagement in the stream computing environment. Generally, calculatingcan include formulating, resolving, computing, estimating, identifying,ascertaining, or otherwise determining the expected data rate foroperation of the plurality of sequential stream operators. The pluralityof sequential stream operators may include a collection of consecutivestream operators or processing elements. In embodiments, the output of afirst stream operator may be connected to the input of a second streamoperator so that data may directly passed between stream operatorswithout the need to save data in a cache (e.g., L2 cache, cache ofanother processor). In embodiments, the plurality of sequential streamoperators may be configured to take turns executing instructions tofacilitate expedient tuple processing (e.g., eliminate waiting). Theexpected data rate may include an indication of the forecasted number ofbits (e.g., basic unit of information) that are conveyed or processed toone or more cores of the set of many-core hardware processors per unitof time. In embodiments, the expected data rate may represent thepredicted amount of data (e.g., number of tuples, size of a data block)that are scheduled for processing by the plurality of sequential streamoperators or storage in a cache of one or more cores of the set ofmany-core hardware processors. As examples, the expected data rate mayinclude measurements such as “509 tuples per second,” “12 data blocksper second,” “84 megabits per second” or the like. In embodiments,calculating the expected data rate may include using a stream datatraffic diagnostic application to monitor the stream computingenvironment to compute an estimate of the amount of incoming data thatis scheduled for processing on a particular processor core. Inembodiments, calculating the expected data rate may include examininghistorical data traffic information for the stream computing environmentto ascertain the expected amount of data traffic for a particularprocessor core at a certain time (e.g., data traffic peaks at 12:00 PM,experiences a lull at 10:30 PM). Other methods of calculating theexpected data rate for operation of a plurality of sequential streamoperators are also possible.

It may be identified that a threshold data rate for a single core of theset of many-core hardware processors exceeds the expected data rate foroperation of the plurality of sequential stream operators. Theidentifying may be performed for cache management in the streamcomputing environment. Generally, identifying can include sensing,discovering, recognizing, resolving, detecting, or otherwiseascertaining that the threshold data rate for a single core of the setof many-core hardware processes exceeds the expected data rate foroperation of the plurality of sequential stream operators. The thresholddata rate may include a maximum, cap, ceiling, benchmark, or target datarate with respect to data processing by the plurality of sequentialstream operators of a single core (e.g., greatest amount of data thatthe single core can maintain/store/process per unit time). For instance,the threshold data rate may include a maximum data rate of “50 megabitsper second.” In embodiments, identifying may include comparing theexpected data rate with respect to the threshold data rate to ascertaina relationship between the magnitude of the expected data rate and thethreshold data rate. As an example, in embodiments, an expected datarate of “360 tuples per second” may be compared with respect to athreshold data rate of “400 tuples per second,” and it may be identifiedthat the threshold data rate exceeds the expected data rate (e.g., theplurality of sequential stream operators may be able to handle theexpected data rate). Other methods of identifying that the thresholddata rate for the single core exceeds the expected data rate foroperation of the plurality of sequential stream operators are alsopossible.

In embodiments, the placement arrangement may be structured. Theplacement arrangement may be structured to deploy the plurality ofsequential stream operators on the single core of the set of many-corehardware processors. The structuring may be performed for cachemanagement in the stream computing environment. Generally, structuringcan include building, forming, organizing, assembling, creating,constructing, arranging, or otherwise establishing the placementarrangement. The placement arrangement may include a configuration,organization, or framework that defines how and where the plurality ofsequential stream operators are distributed within the stream computingenvironment. The placement arrangement may indicate the type of streamoperators (e.g., join, filter, sort, functor), the processor core onwhich they are placed (e.g., fourth core of the second processor), theorder in which they are arranged (e.g., filter operator followed by asort operator followed by a join operator), and other information thatcharacterizes the manner in which the plurality of sequential streamoperators are distributed. In embodiments, structuring may includeallocating the plurality of sequential stream operators to the singlecore (e.g., same single core) of the set of many-core hardwareprocessors. As an example, structuring may include deploying a pluralityof sequential stream operators including a pair of filter operators to athird core of a fifth hardware processor. As such, the pair of filteroperators may take turns filtering the incoming stream of tuples tofacilitate expedient tuple processing. Other methods of structuring theplacement arrangement to deploy the plurality of sequential streamoperators on the single core of the set of many-core hardware processorsare also possible.

In embodiments, a set of cache hits may be managed at module 1043. Themanaging may be performed for cache management in the stream computingenvironment. The set of cache hits may be managed by prioritizing anddeterring. A single job tenancy characteristic may be prioritized basedon the cache factor associated with the set of many-core hardwareprocessors. Generally, prioritizing can include arranging, ordering,ranking, organizing, or otherwise giving preference to the single jobtenancy characteristic. The single job tenancy characteristic mayinclude a property, attribute, or trait that indicates that a particularprocessing unit (e.g., processor or individual core) is dedicated to asingle job (e.g., task, processing operation). In embodiments,prioritizing the single job tenancy characteristic may includedistributing stream operators across cores of the set of many-corehardware processors. For instance, with respect to a set of many-corehardware processors having three processors each having four cores,prioritizing the single job tenancy characteristic may include assigningone job to each of the twelve cores (e.g., rather than assigningmultiple jobs to the same core). In embodiments, a multiple job tenancycharacteristic may be deterred. The deterring may be performed based onthe cache factor associated with the set of many-core hardwareprocessors. Generally, deterring can include limiting, restricting,avoiding, inhibiting, or otherwise mitigating the multi job tenancycharacteristic. The multiple job tenancy characteristic may include aproperty, attribute, or trait that indicates that a particularprocessing unit (e.g., processor or individual core) is discouraged fromhosting a plurality of jobs. In embodiments, deterring the multiple jobtenancy characteristic may include preventing or blocking assignment ofstream operators to cores that already have at least one streamoperator. In embodiments, prioritizing the single job tenancycharacteristic and deterring the multiple job tenancy characteristic mayinclude managing the set of many-core hardware processors to achieve ajob density value below a job density threshold (e.g., 1.6 jobs per coremay achieve a job density threshold of 2 jobs per core). As such, cachehits may be facilitated with respect to the set of many-core hardwareprocessors. Other methods of managing the set of cache hits byprioritizing the single job tenancy characteristic and deterring themultiple job tenancy characteristic are also possible.

In embodiments, a placement arrangement for a set of stream operators onthe set of many-core hardware processors may be determined at module1044. The determining may be performed based on the tuple-processinghardware-route on the set of many-core hardware processors. Generally,determining can include formulating, resolving, computing, calculating,identifying, or otherwise ascertaining the placement arrangement for theset of stream operators based on the tuple-processing hardware-route.The placement arrangement may include a configuration, organization, orframework that defines how and where the plurality of sequential streamoperators are distributed within the stream computing environment. Theplacement arrangement may indicate the type of stream operators (e.g.,join, filter, sort, functor), the processor core on which they areplaced (e.g., fifth core of the third processor), the order in whichthey are arranged (e.g., join operator followed by a filter operatorfollowed by a functor operator), and other information thatcharacterizes the manner in which the plurality of sequential streamoperators are distributed. In embodiments, determining the placementarrangement may include examining the tuple-processing hardware-route toascertain which cores of which processors the stream of tuples isscheduled to be processed by, and subsequently selecting a plurality ofstream operators for assignment to the cores by which the stream oftuples is scheduled to be processed. As an example, based on atuple-processing hardware-route that indicates that the stream of tuplesare to be processed using an L2 cache of a first core of a firstprocessor, an L2 cache of a third core of the first processor, and an L1cache of a fourth core of a second processor, determining the placementarrangement may include ascertaining to assign a first stream operator(e.g., filter operator) to the first core of the first processor, asecond stream operator (e.g., sort operator) to the third core of thefirst processor, and a third stream operator (e.g., join operator) tothe fourth core of the second processor. Other methods of determiningthe placement arrangement based on the tuple-processing hardware-routeare also possible.

A stream computing application may be compiled. The stream computingapplication may use the placement arrangement for the set of streamoperators on the set of many-core hardware processors. The compiling maybe performed for cache management in the stream computing environment.Generally, compiling can include building, arranging, organizing,assembling, constructing, generating, or otherwise structuring thestream computing application which uses the placement arrangement forthe set of stream operators. The stream computing application mayinclude a software program, module, or other collection of executablecomputing code configured to perform a particular function in the streamcomputing environment (e.g., monitor financial transactions, aggregateweather data). In embodiments, compiling can include transforming a setof source code that defines functions for the set of stream operatorsinto a single executable unit in a target computing language (e.g.,assembly language, machine code). In embodiments, compiling the streamcomputing application may include constructing the single executableunit based on the placement arrangement, such that the set of streamoperators are configured for operation (e.g., compatible operatingsystem, pre-loaded device drivers) on the processing units (e.g.,hardware processors and cores) indicated by the tuple-processinghardware-route. In embodiments, the stream computing application may becarried-out. The carrying-out may be performed utilizing the set ofmany-core hardware processors to process the stream of tuples by theplurality of processing elements which operate on the set of many-corehardware processors. Generally, carrying-out can include implementing,instantiating, initiating, utilizing, running, or otherwise executingthe stream computing application to process the stream of tuples by theplurality of processing elements of the set of many-core hardwareprocessors. In embodiments, carrying-out may include using an operatingsystem-level task scheduler to assign system resources to the pluralityof processing elements deployed on the set of many-core hardwareprocessors to perform processing operations on the stream of tuples. Asan example, carrying-out may include allocating CPU usage, memory, andsystem bus prioritization to a filter operation on a second core of athird processor, a functor operator on a third core of the thirdprocessor, and a barrier operator of a first core on a first processorto process the stream of tuples. Other methods of compiling andcarrying-out the stream computing application are also possible.

In embodiments, the stream of tuples may be routed based on a max-flowmin-cut technique at module 1061. The routing may be performed for cachemanagement in the stream computing environment. Generally, routing caninclude conveying, relaying, transferring, conducting, sending, orotherwise directing the stream of tuples based on the max-flow min-cuttechnique. The max-flow min-cut technique may include a method forpromoting data flow in the stream computing environment (e.g., themaximum amount of flow passing from the source to the sink is equal tothe total weight of the wedges in the minimum cut). Routing the streamof tuples based on the max-flow min-cut technique may include examiningthe physical and logical topology of the stream computing environment,and identifying the path that may be used to route the greatest numberof tuples to a destination over the shortest distance. In embodiments,the max-flow min-cut technique may applied differently based on thenature of the processor architecture. Consider an example in which theprocessor architecture includes a ring architecture. Accordingly,routing the stream of tuples using the max-flow min-cut technique mayinclude transmitting tuples to a neighboring core on the same cycle(e.g., the closest core on the same processor). In the event that theneighboring core is occupied with a current workload, the next closestcore may be selected as the destination for the stream of tuples. Othermethods of routing the stream of tuples based on the max-flow min-cuttechnique are also possible.

FIG. 11 illustrates an example system 1100 for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of FIG. 11 relate to an L1 cache 1110and an L2 cache 1120 that may be used to maintain a stream of tuples forprocessing. As described herein, the L2 cache 1120 may have a cache sizethat exceeds the cache size of the L1 cache 1110. For instance, the L2cache 1120 may have a cache size of between 512 kilobytes and 4megabytes, and the L1 cache 1110 may have a cache size of 32-64kilobytes. In embodiments, the L2 cache 1120 may have a cache accessburden that exceeds the cache access burden of the L1 cache 1110. As anexample, the L1 cache 1110 may have a cache access burden of 2-4 CPUclock cycles, and the L2 cache 1120 may have a cache access burden of7-20 CPU clock cycles. Other types of caches are also possible.

FIG. 12 illustrates an example system 1200 for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of FIG. 12 illustrate a method ofmanaging a cache to facilitate instruction processing in a streamcomputing environment. In embodiments, cache slot 1 1210 and cache slot2 1220 may be used to store constant values of 1 and 2, respectively.Cache slot 3 1230 may be used for calculation of variable “X” and cacheslot 4 1240 may be used for calculation of variable “Y” In embodiments,as shown herein, an existing value may be overwritten (e.g., using aleast recently used algorithm) to store the calculation for the variable“Z.” Other methods of cache management in a stream computing environmentare also possible.

FIG. 13 illustrates an example system 1300 for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors,according to embodiments. Aspects of FIG. 13 relate to managing an L1cache 1350 with respect to a stream computing application. The L1 cache1350 may receive a set of received values (e.g., marked “Recv”) andgenerate a set of sending values (e.g., marked send). In embodiments,each pair of values that are received together may be summed (e.g.,Send(1)=Recv(1)+Recv(2), Send(2)=Recv(2)+Recv(3),Send(3)=Recv(3)+Recv(4)). In embodiments, aspects of the disclosurerelate to managing L1 cache 1350 based on a cache factor to facilitateefficient instruction processing. For instance, based on a cache factorthat indicates that the L1 cache 1350 can hold up to 15 values and thatany given calculation requires three value slots (e.g., two value slotsfor inputs and one value slot for a result), the cache may be managed todetect when a subsequent calculation may fill up the L1 cache 1350(e.g., 12 slots are currently full, and a stream of tuples requiringcomputation is incoming), and values may be transferred to an L2 cachebefore the L1 cache 1350 is full (e.g., to avoid wasting CPU cyclestransferring values after the L1 cache 1350 is full). As such, processorstalls due to L2 cache transfers may be avoided, resulting in positiveimpacts with respect to value computation time and cache hit frequency.Other methods of cache management are also possible.

FIG. 14 illustrates an example system architecture 1400 of a set ofmany-core hardware processors, according to embodiments. The examplesystem architecture 1400 may include a first processor 1410 and a secondprocessor 1450. The first processor 1410 may include a first set of CPUcores 1420 and the second processor 1450 may include a second set of CPUcores 1460. In embodiments, both the first set of CPU cores 1420 and thesecond set of CPU cores 1460 may include a local L1 cache and an L2cache. The first set of CPU cores 1420 may share use of a first L3 cache1425, and the second set of CPU cores 1460 may share use of a second L3cache 1465. One or more cores of the first set of CPU cores 1420 and thesecond set of CPU cores 1460 may host stream operators for processing astream of tuples from the stream computing environment. In embodiments,as described herein, aspects of the disclosure relate to determining atuple-processing hardware route based on a cache factor associated withthe set of many-core hardware processors, and routing a stream of tuplesbased on the tuple-processing hardware route for processing utilizingthe set of many-core hardware processors. Accordingly, leveragingprocessor architecture information and stream applicationcharacteristics with respect to cache management may be associated withbenefits such as stream application performance, cache hit rates, andprocessing efficiency

In addition to embodiments described above, other embodiments havingfewer operational steps, more operational steps, or differentoperational steps are contemplated. Also, some embodiments may performsome or all of the above operational steps in a different order. Inembodiments, operational steps may be performed in response to otheroperational steps. The modules are listed and described illustrativelyaccording to an embodiment and are not meant to indicate necessity of aparticular module or exclusivity of other potential modules (orfunctions/purposes as applied to a specific module).

In the foregoing, reference is made to various embodiments. It should beunderstood, however, that this disclosure is not limited to thespecifically described embodiments. Instead, any combination of thedescribed features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thisdisclosure. Many modifications and variations may be apparent to thoseof ordinary skill in the art without departing from the scope and spiritof the described embodiments. Furthermore, although embodiments of thisdisclosure may achieve advantages over other possible solutions or overthe prior art, whether or not a particular advantage is achieved by agiven embodiment is not limiting of this disclosure. Thus, the describedaspects, features, embodiments, and advantages are merely illustrativeand are not considered elements or limitations of the appended claimsexcept where explicitly recited in a claim(s).

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

Embodiments according to this disclosure may be provided to end-usersthrough a cloud-computing infrastructure. Cloud computing generallyrefers to the provision of scalable computing resources as a serviceover a network. More formally, cloud computing may be defined as acomputing capability that provides an abstraction between the computingresource and its underlying technical architecture (e.g., servers,storage, networks), enabling convenient, on-demand network access to ashared pool of configurable computing resources that can be rapidlyprovisioned and released with minimal management effort or serviceprovider interaction. Thus, cloud computing allows a user to accessvirtual computing resources (e.g., storage, data, applications, and evencomplete virtualized computing systems) in “the cloud,” without regardfor the underlying physical systems (or locations of those systems) usedto provide the computing resources.

Typically, cloud-computing resources are provided to a user on apay-per-use basis, where users are charged only for the computingresources actually used (e.g., an amount of storage space used by a useror a number of virtualized systems instantiated by the user). A user canaccess any of the resources that reside in the cloud at any time, andfrom anywhere across the Internet. In context of the present disclosure,a user may access applications or related data available in the cloud.For example, the nodes used to create a stream computing application maybe virtual machines hosted by a cloud service provider. Doing so allowsa user to access this information from any computing system attached toa network connected to the cloud (e.g., the Internet).

Embodiments of the present disclosure may also be delivered as part of aservice engagement with a client corporation, nonprofit organization,government entity, internal organizational structure, or the like. Theseembodiments may include configuring a computer system to perform, anddeploying software, hardware, and web services that implement, some orall of the methods described herein. These embodiments may also includeanalyzing the client's operations, creating recommendations responsiveto the analysis, building systems that implement portions of therecommendations, integrating the systems into existing processes andinfrastructure, metering use of the systems, allocating expenses tousers of the systems, and billing for use of the systems.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

While the foregoing is directed to exemplary embodiments, other andfurther embodiments of the invention may be devised without departingfrom the basic scope thereof, and the scope thereof is determined by theclaims that follow. The descriptions of the various embodiments of thepresent disclosure have been presented for purposes of illustration, butare not intended to be exhaustive or limited to the embodimentsdisclosed. Many modifications and variations will be apparent to thoseof ordinary skill in the art without departing from the scope and spiritof the described embodiments. The terminology used herein was chosen toexplain the principles of the embodiments, the practical application ortechnical improvement over technologies found in the marketplace, or toenable others of ordinary skill in the art to understand the embodimentsdisclosed herein.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the variousembodiments. As used herein, the singular forms “a,” “an,” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. “Set of,” “group of,” “bunch of,” etc. are intendedto include one or more. It will be further understood that the terms“includes” and/or “including,” when used in this specification, specifythe presence of the stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof. In the previous detaileddescription of exemplary embodiments of the various embodiments,reference was made to the accompanying drawings (where like numbersrepresent like elements), which form a part hereof, and in which isshown by way of illustration specific exemplary embodiments in which thevarious embodiments may be practiced. These embodiments were describedin sufficient detail to enable those skilled in the art to practice theembodiments, but other embodiments may be used and logical, mechanical,electrical, and other changes may be made without departing from thescope of the various embodiments. In the previous description, numerousspecific details were set forth to provide a thorough understanding thevarious embodiments. But, the various embodiments may be practicedwithout these specific details. In other instances, well-known circuits,structures, and techniques have not been shown in detail in order not toobscure embodiments.

What is claimed is:
 1. A computer-implemented method for cachemanagement in a stream computing environment that uses a set ofmany-core hardware processors to process a stream of tuples by aplurality of processing elements which operate on the set of many-corehardware processors, the method comprising: receiving the stream oftuples to be processed by the plurality of processing elements whichoperate on the set of many-core hardware processors; determining, basedon a cache factor associated with the set of many-core hardwareprocessors, a tuple-processing hardware-route on the set of many-corehardware processors; routing, based on the tuple-processinghardware-route on the set of many-core hardware processors, the streamof tuples; processing, utilizing the set of many-core hardwareprocessors, the stream of tuples by the plurality of processing elementswhich operate on the set of many-core hardware processors; computing,for cache management in the stream computing environment, a first cacheutilization factor for a first cache of a first core of the set ofmany-core hardware processors; computing, for cache management in thestream computing environment, a second cache utilization factor for asecond cache of the first core of the set of many-core hardwareprocessors; resolving, by comparing the first cache utilization factorfor the first cache of the first core of the set of many-core hardwareprocessors with the second cache utilization factor for the second cacheof the first core of the set of many-core hardware processors, thetuple-processing hardware-route to prioritize utilization of the firstcache of the first core of the set of many-core hardware processors withrespect to the second cache of the first core of the set of many-corehardware processors; and prioritizing, pertaining to processing thestream of tuples utilizing the set of many-core hardware processors, thefirst cache of the first core of the set of many-core hardwareprocessors with respect to the second cache of the first core of the setof many-core hardware processors.
 2. The method of claim 1, furthercomprising: detecting, for cache management in the stream computingenvironment, that the first and second caches of the first core of theset of many-core hardware processors are local caches to the first coreof the set of many-core hardware processors.
 3. The method of claim 2,further comprising: detecting, for cache management in the streamcomputing environment, that the first and second caches of the firstcore of the set of many-core hardware processors are local caches onlyto the first core of the set of many-core hardware processors.
 4. Themethod of claim 1, further comprising: ascertaining, for cachemanagement in the stream computing environment, that a second cache sizeof the second cache of the first core of the set of many-core hardwareprocessors exceeds a first cache size of the first cache of the firstcore of the set of many-core hardware processors; and ascertaining, forcache management in the stream computing environment, that a secondcache access burden of the second cache of the first core of the set ofmany-core hardware processors exceeds a first cache access burden of thefirst cache of the first core of the set of many-core hardwareprocessors.
 5. The method of claim 1, further comprising: resolving, bycomparing the first cache utilization factor for the first cache of thefirst core of the set of many-core hardware processors with the secondcache utilization factor for the second cache of the first core of theset of many-core hardware processors, the tuple-processinghardware-route to prioritize utilization of the second cache of thefirst core of the set of many-core hardware processors with respect tothe first cache of the first core of the set of many-core hardwareprocessors; and prioritizing, pertaining to processing the stream oftuples utilizing the set of many-core hardware processors, the secondcache of the first core of the set of many-core hardware processors withrespect to the first cache of the first core of the set of many-corehardware processors.
 6. The method of claim 5, further comprising:detecting, for cache management in the stream computing environment,that the first cache utilization factor for the first cache of the firstcore of the set of many-core hardware processors includes a datatransfer factor which indicates a burden of data movement between cachesof the first and second cores.
 7. The method of claim 5, furthercomprising: ascertaining, for cache management in the stream computingenvironment, that a second cache size of the second cache of the firstcore of the set of many-core hardware processors exceeds a first cachesize of the first cache of the first core of the set of many-corehardware processors; and ascertaining, for cache management in thestream computing environment, that a second cache access burden of thesecond cache of the first core of the set of many-core hardwareprocessors exceeds a first cache access burden of the first cache of thefirst core of the set of many-core hardware processors.
 8. The method ofclaim 1, further comprising: computing, for cache management in thestream computing environment, a third cache utilization factor for athird cache of a first core of the set of many-core hardware processors;computing, for cache management in the stream computing environment, athird cache utilization factor for a third cache of a second core of theset of many-core hardware processors, wherein the third cache of thefirst core is a different physical cache from the third cache of thesecond core; resolving, by comparing the third cache utilization factorfor the third cache of the first core of the set of many-core hardwareprocessors with the third cache utilization factor for the third cacheof the second core of the set of many-core hardware processors, thetuple-processing hardware-route to prioritize utilization of the thirdcache of the first core of the set of many-core hardware processors withrespect to the third cache of the second core of the set of many-corehardware processors; and prioritizing, pertaining to processing thestream of tuples utilizing the set of many-core hardware processors, thethird cache of the first core of the set of many-core hardwareprocessors with respect to the third cache of the second core of the setof many-core hardware processors.
 9. The method of claim 8, furthercomprising: detecting, for cache management in the stream computingenvironment, that the third cache of the first core of the set ofmany-core hardware processors is shared with a third core of the set ofmany-core hardware processors; and detecting, for cache management inthe stream computing environment, that the third cache of the secondcore of the set of many-core hardware processors is neither shared withthe first core of the set of many-core hardware processors nor the thirdcore of the set of many-core hardware processors.
 10. The method ofclaim 1, further comprising: configuring, for cache management in thestream computing environment, the cache factor associated with the setof many-core hardware processors to include a set of physical distancesbetween a plurality of cores of the set of many-core hardwareprocessors; and determining, using the set of physical distances, thetuple-processing hardware-route on the set of many-core hardwareprocessors to route the stream of tuples a shorter distance betweencores.
 11. The method of claim 10, further comprising: routing, forcache management in the stream computing environment, the stream oftuples based on a max-flow min-cut technique.
 12. The method of claim 1,further comprising: managing, for cache management in the streamcomputing environment, a set of cache hits by: prioritizing, based onthe cache factor associated with the set of many-core hardwareprocessors, a single job tenancy characteristic; and deterring, based onthe cache factor associated with the set of many-core hardwareprocessors, a multiple job tenancy characteristic.
 13. The method ofclaim 1, further comprising: detecting that the set of many-corehardware processors is selected from the group consisting of: one ormore ring architectures; one or more two-dimensional mesh architectures;one or more three-dimensional mesh architectures; and one or more torusarchitectures.
 14. The method of claim 1, further comprising:determining, based on the tuple-processing hardware-route on the set ofmany-core hardware processors, a placement arrangement for a set ofstream operators on the set of many-core hardware processors; compiling,for cache management in the stream computing environment, a streamcomputing application which uses the placement arrangement for the setof stream operators on the set of many-core hardware processors; andcarrying-out the stream computing application utilizing the set ofmany-core hardware processors to process the stream of tuples by theplurality of processing elements which operate on the set of many-corehardware processors.
 15. The method of claim 14, further comprising:calculating, for cache management in the stream computing environment,an expected data rate for operation of a plurality of sequential streamoperators; identifying, for cache management in the stream computingenvironment, that a threshold data rate for a single core of the set ofmany-core hardware processors exceeds the expected data rate foroperation of the plurality of sequential stream operators; andstructuring, for cache management in the stream computing environment,the placement arrangement to deploy the plurality of sequential streamoperators on the single core of the set of many-core hardwareprocessors.
 16. The method of claim 1, further comprising: executing, ina dynamic fashion to streamline cache management in the stream computingenvironment that uses the set of many-core hardware processors toprocess the stream of tuples by the plurality of processing elementswhich operate on the set of many-core hardware processors, each of: thereceiving, the determining, the routing, and the processing.
 17. Themethod of claim 1, further comprising: executing, in an automatedfashion without user intervention, each of: the receiving, thedetermining, the routing, and the processing.
 18. A system for cachemanagement in a stream computing environment that uses a set ofmany-core hardware processors to process a stream of tuples by aplurality of processing elements which operate on the set of many-corehardware processors, the system comprising: a memory having a set ofcomputer readable instructions, and a processor for executing the set ofcomputer readable instructions, the set of computer readableinstructions including: receiving the stream of tuples to be processedby the plurality of processing elements which operate on the set ofmany-core hardware processors; determining, based on a cache factorassociated with the set of many-core hardware processors, atuple-processing hardware-route on the set of many-core hardwareprocessors; routing, based on the tuple-processing hardware-route on theset of many-core hardware processors, the stream of tuples; processing,utilizing the set of many-core hardware processors, the stream of tuplesby the plurality of processing elements which operate on the set ofmany-core hardware processors; computing, for cache management in thestream computing environment, a first cache utilization factor for afirst cache of a first core of the set of many-core hardware processors;computing, for cache management in the stream computing environment, asecond cache utilization factor for a second cache of the first core ofthe set of many-core hardware processors; resolving, by comparing thefirst cache utilization factor for the first cache of the first core ofthe set of many-core hardware processors with the second cacheutilization factor for the second cache of the first core of the set ofmany-core hardware processors, the tuple-processing hardware-route toprioritize utilization of the first cache of the first core of the setof many-core hardware processors with respect to the second cache of thefirst core of the set of many-core hardware processors; andprioritizing, pertaining to processing the stream of tuples utilizingthe set of many-core hardware processors, the first cache of the firstcore of the set of many-core hardware processors with respect to thesecond cache of the first core of the set of many-core hardwareprocessors.
 19. A computer program product for cache management in astream computing environment that uses a set of many-core hardwareprocessors to process a stream of tuples by a plurality of processingelements which operate on the set of many-core hardware processors, thecomputer program product comprising a computer readable storage mediumhaving program instructions embodied therewith, wherein the computerreadable storage medium is not a transitory signal per se, the programinstructions executable by a processor to cause the processor to performa method comprising: receiving the stream of tuples to be processed bythe plurality of processing elements which operate on the set ofmany-core hardware processors; determining, based on a cache factorassociated with the set of many-core hardware processors, atuple-processing hardware-route on the set of many-core hardwareprocessors; routing, based on the tuple-processing hardware-route on theset of many-core hardware processors, the stream of tuples; processing,utilizing the set of many-core hardware processors, the stream of tuplesby the plurality of processing elements which operate on the set ofmany-core hardware processors; computing, for cache management in thestream computing environment, a first cache utilization factor for afirst cache of a first core of the set of many-core hardware processors;computing, for cache management in the stream computing environment, asecond cache utilization factor for a second cache of the first core ofthe set of many-core hardware processors; resolving, by comparing thefirst cache utilization factor for the first cache of the first core ofthe set of many-core hardware processors with the second cacheutilization factor for the second cache of the first core of the set ofmany-core hardware processors, the tuple-processing hardware-route toprioritize utilization of the first cache of the first core of the setof many-core hardware processors with respect to the second cache of thefirst core of the set of many-core hardware processors; andprioritizing, pertaining to processing the stream of tuples utilizingthe set of many-core hardware processors, the first cache of the firstcore of the set of many-core hardware processors with respect to thesecond cache of the first core of the set of many-core hardwareprocessors.